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 ConsoleApplication1
- {
- class Volleyball
- {
- static void Main()
- {
- string leap = Console.ReadLine();
- int holidays = int.Parse(Console.ReadLine());
- int weekendsHome = int.Parse(Console.ReadLine());
- double holidaysPlay = holidays*2.0/3.0;
- int normalWeekends = 48 - weekendsHome;
- double weekendsNotWorking = (normalWeekends * 3.0 / 4.0);
- double timePlaying = weekendsNotWorking + holidaysPlay + weekendsHome;
- if(leap == "leap")
- timePlaying = timePlaying*1.15;
- Console.WriteLine((int)timePlaying);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment