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 Program
- {
- static void Main(string[] args)
- {
- var typeOfYear = Console.ReadLine(); // “leap” or “normal”
- var p = int.Parse(Console.ReadLine()); // празници без съб и нед
- var h = int.Parse(Console.ReadLine()); // уикенди в родния град
- double voleyballDaysSofia = ((48 - h) * 3 / 4.0) + p * 2 / 3.0;
- double voleyballDays = voleyballDaysSofia + h;
- double additionalVoley = 0;
- if (typeOfYear == "leap")
- {
- additionalVoley = voleyballDays * 15 / 100.0;
- voleyballDays += additionalVoley;
- }
- voleyballDays = Math.Floor(voleyballDays);
- Console.WriteLine(voleyballDays);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement