|
|||
CurrencyWhen you travel to Hong Kong, the first thing is currency exchange because foreign currencies are not accepted in Hong Kong. Given the exchange rate of different currencies and the amount of Hong Kong Dollars you need, please calculate the corresponding amount of foreign currencies. Input SpecificationThe input contains N + 2 lines. The first line contains a number N (N ≤ 15), which means the number of foreign currencies. In the following N lines, each line contains a string of three uppercase alphabetic characters and a positive real number, which indicate the name of the foreign currency and the exchange rate (100 units of the foreign currency against HKD). The last line contains a positive real number, which shows the amount of HKD you want to spend in Hong Kong. Output SpecificationThe output should contain N lines. Each line contains the name of a foreign currency and the amount you need to have in that currency (in order to exchange the HKD you want to spend). Real numbers in the output should be rounded to 0.01. The output order of currencies should be the same as the input one. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |