Advertisement
Spocoman

Voleyball

Nov 27th, 2021
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Voleyball
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string year = Console.ReadLine();
  10.             int p = int.Parse(Console.ReadLine());
  11.             int h = int.Parse(Console.ReadLine());
  12.  
  13.             double game = ((48 - h) * 3 / 4) + h + p * 2 / 3;
  14.  
  15.             if (year == "leap")
  16.             {
  17.                 game *= 1.15;
  18.             }
  19.  
  20.             Console.WriteLine(Math.Floor(game));
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement