HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50198 - Euro to Leke

Section problems

• 50145 - Close City
• 50149 - Albanian Airlines
• 50150 - Divisible by m
• 50159 - Triangular Numbers
• 50162 - Mersenne prime
• 50164 - The roots of a quadratic eq...
• 50172 - Permutations and Combinat...
• 50192 - Nr of Missing Guests
• 50198 - Euro to Leke
• 50201 - Total Discount for the clients
• 50202 - Buying Books from Internet
• 50215 - ZScore normalization
• 50232 - Sum of Even Numbers
• 50239 - Basic Math Calculator
• 50246 - Ascending Numbers
• 50247 - Descending Numbers
• 50262 - Function f(x)

Feedback

If you notice incorrect translations in Contester, please let author know.

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)

Для отправки решений необходимо выполнить вход.

www.contester.ru