HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


50807 - Euro to Leke

Guest
• Discussion of problem (2)

Volume problems

• 50338 - Convert Into Decimal
• 50295 - Weighted Average
• 50815 - Breaking the Bunker
• 50899 - How Many Years
• 50806 - TVSH
• 50820 - Post Office
• 50810 - Print Office
• 50952 - Derby Tirana
• 50807 - Euro to Leke
• 50871 - Harmonic Mean
• 50859 - Low performance
• 50508 - The Biggest Area
• 50528 - Rock-Scissors-Paper
• 50744 - The Smallest Perimeter
• 50808 - Total Distance Traveled
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients

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