HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50807 - Euro to Leke

Guest
• Discussion of problem (2)

Section problems

• 50481 - Car Parking
• 50417 - Fun Fair
• 50530 - Sum of Ratios
• 50384 - Permutations revisited
• 50368 - Right-most non zero digit in N!
• 50369 - Base Conversion
• 50407 - Missing Number
• 51003 - Double Prime
• 50807 - Euro to Leke
• 50433 - Sum of Cubes
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization

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