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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string y = Console.ReadLine();
- double p = double.Parse(Console.ReadLine());
- double h = double.Parse(Console.ReadLine());
- double perc = 0;
- double weekends = (48 - h) * 3.0 / 4;
- double gamesWeek = p * 2.0 / 3;
- double total = h + gamesWeek + weekends;
- if (y == "leap")
- {
- perc = total * 0.15;
- }
- Console.WriteLine(Math.Truncate(total + perc));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement