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;
- double hour = Math.Floor(normTime - playTime)/ 60;
- double minutes = Math.Floor(normTime - playTime) % 60;
- if (normTime <= playTime)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($"{hour} hours and {minutes} minutes more for play");
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{hour} hours and {minutes} minutes less for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment