zh_stoqnov

Volleyball

Mar 26th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.  
  10. class Volleyball
  11. {
  12. static void Main()
  13. {
  14. string leap = Console.ReadLine();
  15. int holidays = int.Parse(Console.ReadLine());
  16. int weekendsHome = int.Parse(Console.ReadLine());
  17. double holidaysPlay = holidays*2.0/3.0;
  18. int normalWeekends = 48 - weekendsHome;
  19. double weekendsNotWorking = (normalWeekends * 3.0 / 4.0);
  20. double timePlaying = weekendsNotWorking + holidaysPlay + weekendsHome;
  21. if(leap == "leap")
  22. timePlaying = timePlaying*1.15;
  23.  
  24. Console.WriteLine((int)timePlaying);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment