Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
Euro to Leke
Shqip
Question:
An international company is selling
products in Leke and Euro, but keeping its
accounting books in Leke. Write a program
that reads information for n transactions,
then calculates the total amount in Leke.
Input Specification:
Firstly, you will be
given an integer (n, the number of transactions),
then, a floating point number (euro2Leke,
Euro to Leke conversion rate) where euro2Leke is
smaller than 1e4. Then, your program will read
n number of pairs:
- the type of transaction (1 is
Leke and 2 is Euro) and
- a floating point number smaller than 1e5
Output Specification:
Show one floating point number: total
amount spent in leke.
Sample Input 1 |
Sample Output 1 |
4 141
1 1200
2 20
1 1500
2 30
|
9750
|
Explanation: There are two
transaction in leke (1200+1500 = 2700) and two
transactions in Euro (20+30=50) Euro which makes
(50*141) 7050 leke and the total is
9750 (2700 + 7050)
Для отправки решений необходимо выполнить вход.
|