Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Vladi
- {
- class Program
- {
- static void Main(string[] args)
- {
- string leapOrNormal = Console.ReadLine();
- double p = double.Parse(Console.ReadLine());
- double h = double.Parse(Console.ReadLine());
- double weekends = 48 ;
- double weekendSofia = (weekends - h) * 3 / 4;
- double daytravel = h;
- double dayholiday = p * 2 / 3;
- double totalPlayTime = weekendSofia + daytravel + dayholiday;
- double finalPlay = 0;
- if (leapOrNormal == "leap")
- {
- finalPlay= totalPlayTime * 0.15 + totalPlayTime;
- Console.WriteLine($"{Math.Floor(finalPlay)}");
- }
- else if (leapOrNormal=="normal")
- {
- Console.WriteLine($"{Math.Floor(totalPlayTime)}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment