Skip to content

Instantly share code, notes, and snippets.

@boyanov83
Created July 27, 2014 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boyanov83/2a781852ca7f3c5597bd to your computer and use it in GitHub Desktop.
Save boyanov83/2a781852ca7f3c5597bd to your computer and use it in GitHub Desktop.
using System;
class Joro
{
static void Main()
{
string leapYear = Console.ReadLine();
double holidays = double.Parse(Console.ReadLine());
double homeWeekends = double.Parse(Console.ReadLine());
double normalWeekends = 52 - homeWeekends;
double totalPlays = 0;
totalPlays += holidays / 2;
totalPlays += homeWeekends;
totalPlays += normalWeekends * 2 / 3;
if (leapYear == "t")
{
totalPlays += 3;
}
Console.WriteLine(Math.Floor(totalPlays));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment