Skip to content

Instantly share code, notes, and snippets.

@vdonchev
Created June 6, 2015 12:14
Show Gist options
  • Save vdonchev/a4c130dcea0dcc463708 to your computer and use it in GitHub Desktop.
Save vdonchev/a4c130dcea0dcc463708 to your computer and use it in GitHub Desktop.
using System;
class Volleyball
{
static void Main()
{
string yearType = Console.ReadLine();
int hollydays = int.Parse(Console.ReadLine());
int homwtownWeekends = int.Parse(Console.ReadLine());
int normalWeekends = 48 - homwtownWeekends;
double totalPlays = homwtownWeekends + (normalWeekends * 0.75D) + ((hollydays / 3D) * 2D);
totalPlays += (yearType == "leap") ? totalPlays * 0.15D : 0;
Console.WriteLine((int)totalPlays);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment