Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _6.Волейбол
- {
- class Program
- {
- static void Main(string[] args)
- {
- string year = Console.ReadLine();
- int holidays = int.Parse(Console.ReadLine());
- int weekendsInBirthTown = int.Parse(Console.ReadLine());//2
- const int weekendsInOneYear = 48;
- double weekendsInSofia = weekendsInOneYear - weekendsInBirthTown; //48-2 = 46
- double SaturdayGames = weekendsInSofia * 3.0 / 4; //34.5
- double GamesInSofiaInHolidays = holidays * 2.0 / 3; //5*2/3 = 3.333
- double totalGames = SaturdayGames + weekendsInBirthTown + GamesInSofiaInHolidays;
- if (year == "leap")
- {
- totalGames *= 1.15;
- }
- Console.WriteLine(Math.Floor(totalGames));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment