Skip to content

Instantly share code, notes, and snippets.

@Tuscann
Created March 6, 2016 16:20
Show Gist options
  • Save Tuscann/2415cab39d906a3bdd67 to your computer and use it in GitHub Desktop.
Save Tuscann/2415cab39d906a3bdd67 to your computer and use it in GitHub Desktop.
using System;
class Program
{
static void Main()
{
var year = Console.ReadLine().ToLower();
var happyDays = double.Parse(Console.ReadLine());
var weeksReturnHome = double.Parse(Console.ReadLine());
var weekInYear = 48.0;
var weekends = (weekInYear - weeksReturnHome) * 3.0 / 4.0;
var sofiaPlays = happyDays * 2.0 / 3.0;
var totalGames = weekends + sofiaPlays + weeksReturnHome;
if (year == "leap") { totalGames = totalGames * 1.15; }
Console.WriteLine(Math.Truncate(totalGames));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment