joro_thexfiles

Волейбол

Mar 15th, 2019
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 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 _6.Волейбол
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string year = Console.ReadLine();
  14. int holidays = int.Parse(Console.ReadLine());
  15. int weekendsInBirthTown = int.Parse(Console.ReadLine());//2
  16.  
  17. const int weekendsInOneYear = 48;
  18. double weekendsInSofia = weekendsInOneYear - weekendsInBirthTown; //48-2 = 46
  19.  
  20. double SaturdayGames = weekendsInSofia * 3.0 / 4; //34.5
  21. double GamesInSofiaInHolidays = holidays * 2.0 / 3; //5*2/3 = 3.333
  22. double totalGames = SaturdayGames + weekendsInBirthTown + GamesInSofiaInHolidays;
  23.  
  24. if (year == "leap")
  25. {
  26. totalGames *= 1.15;
  27. }
  28.  
  29. Console.WriteLine(Math.Floor(totalGames));
  30.  
  31.  
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment