fbinnzhivko

01.01 Torrent Pirate

Mar 12th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Problem_1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int d = int.Parse(Console.ReadLine());
  14.             int p = int.Parse(Console.ReadLine());
  15.             int w = int.Parse(Console.ReadLine());
  16.  
  17.             decimal timeDownload = Math.Round((decimal)d / 2.0m / 60.0m / 60.0m, 4);
  18.             decimal priceDownload = Math.Round(timeDownload * w, 2);
  19.             decimal numberOfMovies = d / 1500m;
  20.             decimal cinemaPrice = numberOfMovies * p;
  21.             if (cinemaPrice >= priceDownload)
  22.             {
  23.                 Console.WriteLine("mall -> {0:F2}lv", priceDownload);
  24.             }
  25.             else
  26.             {
  27.                 Console.WriteLine("cinema -> {0:F2}lv", cinemaPrice);
  28.             }
  29.         }
  30.     }
  31. }
Add Comment
Please, Sign In to add comment