Skip to content

Instantly share code, notes, and snippets.

@boyanov83
Created July 28, 2014 18:16
Show Gist options
  • Save boyanov83/87215dd6e0ff8fd48fa8 to your computer and use it in GitHub Desktop.
Save boyanov83/87215dd6e0ff8fd48fa8 to your computer and use it in GitHub Desktop.
using System;
class Volleyball
{
static void Main()
{
string year = Console.ReadLine();
double p = double.Parse(Console.ReadLine());
double h = double.Parse(Console.ReadLine());
double totalPlays = h;
double normalWeekends = 48 - h;
totalPlays = totalPlays + (normalWeekends * 0.75);
totalPlays = totalPlays + (p * 2/3);
if (year == "leap")
{
totalPlays = totalPlays + (totalPlays * 0.15);
}
Console.WriteLine((int)totalPlays);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment