Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Volleyball
- {
- class Volleyball
- {
- public static void Main(string[] args)
- {
- string leap = Console.ReadLine();
- int p = int.Parse(Console.ReadLine());
- int h = int.Parse(Console.ReadLine());
- double weekends = 48;
- double hometownPlays = (double)h;
- double normalPlays = (double)((weekends - hometownPlays) * 3) / 4;
- double holidayPlays = (double)(((double)p * 2) / 3);
- double allPlays = hometownPlays + normalPlays + holidayPlays;
- int allPlaysRounded = (int)allPlays;
- double allPlaysLeap = allPlays + (allPlays * 0.15);
- int allPlaysLeapRounded = (int)allPlaysLeap;
- if(leap == "leap")
- {
- Console.WriteLine(allPlaysLeapRounded);
- }
- else
- {
- Console.WriteLine(allPlaysRounded);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment