Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace VolleyBall
- {
- class Program
- {
- static void Main(string[] args)
- {
- string yearType = Console.ReadLine();
- int holidaysPerYear = int.Parse(Console.ReadLine());
- int homeTownWeekends = int.Parse(Console.ReadLine());
- double gamesInSofia = (48 - homeTownWeekends)*3/4.0;
- double gamesInSofiaDuringHolidays = holidaysPerYear*2/3.0;
- double totalGames = gamesInSofiaDuringHolidays + gamesInSofia + homeTownWeekends;
- if (yearType == "leap")
- {
- double bonusGames = totalGames*0.15;
- totalGames += bonusGames;
- }
- Console.WriteLine((int)totalGames);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment