Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- /*
- First - Russian site selling games in rubles
- Second - American site selling games in dollars
- Third - Official sit of the game selling games in euros
- Fourth - Bulgarian site selling games in leva - B - 2 copies of the game for the price for one
- Fifth - Bulgarian site selling game in leva - M
- 100 rubles = 3.5 leva
- 1 dollar = 1.5 leva
- 1 euro = 1.95 leva
- if spiro buys 2 special games from B site, he always sell one of them for exactly half of the money he paid for both
- */
- class ImpressTheGirlfriend
- {
- static void Main()
- {
- uint r = uint.Parse(Console.ReadLine());
- uint d = uint.Parse(Console.ReadLine());
- uint e = uint.Parse(Console.ReadLine());
- uint b = uint.Parse(Console.ReadLine());
- uint m = uint.Parse(Console.ReadLine());
- decimal rubles = (r / 100.0M) * 3.5M;
- decimal dollars = d * 1.5M;
- decimal euros = e * 1.95M;
- decimal bSiteInleva = b / 2;
- decimal[] allPrices = {rubles, dollars, euros, bSiteInleva, m};
- decimal mostExpensive = allPrices.Max();
- Console.WriteLine("{0:F2}", Math.Ceiling(mostExpensive));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement