Advertisement
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 Volleyball
- {
- class Volleyball
- {
- static void Main(string[] args)
- {
- string year = Console.ReadLine().ToLower();
- int p = int.Parse(Console.ReadLine()); // Holidays а year
- int h = int.Parse(Console.ReadLine()); // Volleyball in HomeTown
- int SofiaWeek = 48 - h;
- var PlaySofia = (3.0 / 4) * SofiaWeek;
- var PlayHolidays = (2.0 / 3) * p;
- var PlaySum = PlaySofia + PlayHolidays + h;
- if (year == "leap")
- {
- var PlayResult = PlaySum + PlaySum * 0.15;
- Console.WriteLine(Math.Truncate(PlayResult));
- }
- else if (year == "normal")
- Console.WriteLine(Math.Truncate(PlaySum));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement