Created
March 6, 2016 16:20
-
-
Save Tuscann/2415cab39d906a3bdd67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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