Advertisement
fbinnzhivko

01.01 Volleyballl

May 2nd, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         string year = Console.ReadLine();
  7.         int p = int.Parse(Console.ReadLine());
  8.         int hometown = int.Parse(Console.ReadLine());
  9.  
  10.         double x = ((48 - hometown) * (3.0 / 4.0)) + (p * (2.0 / 3.0)) + hometown;
  11.  
  12.         if (year == "leap")  // leap yaer
  13.         {
  14.             x = x * 1.15;
  15.         }
  16.         Console.WriteLine(Math.Floor(x));
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement