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 Sleepy_Cat_Tom
- {
- class Program
- {
- static void Main(string[] args)
- {
- int daysOff = int.Parse(Console.ReadLine());
- int workDays = 365 - daysOff;
- int realPlayTime = workDays * 63 + daysOff * 127;
- int standartDifference = Math.Abs(30000 - realPlayTime);
- double hours = standartDifference / 60;
- double minutes = standartDifference % 60;
- if (realPlayTime > 30000)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($"{hours} hours and {minutes} minutes more for play");
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{hours} hours and {minutes} minutes less for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement