Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TomCat_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int freeDays = int.Parse(Console.ReadLine());
- double normTime = 30000;
- double playTime = ((365 - freeDays) * 63) + freeDays * 127;
- if (normTime >= playTime)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{Math.Floor(normTime - playTime) / 60} hours and {Math.Floor(normTime - playTime) % 60} minutes less for play");
- }
- else
- {
- Console.WriteLine($"Tom will run away");
- Console.WriteLine($"{Math.Floor(playTime - normTime) / 60} hours and {Math.Floor(playTime - normTime) % 60} minutes more for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment