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 Sleeping_cat_tom
- {
- class Program
- {
- static void Main(string[] args)
- {
- int dayOff = int.Parse(Console.ReadLine());
- int normTom = 30000;
- int wdPlay = 63;
- int dfPlay = 127;
- int workday = 365 - dayOff;
- int realPlay = (workday * wdPlay + dayOff * 127);
- int diffPlay = (normTom - realPlay);
- int hours = diffPlay / 60;
- double min = hours / 60;
- if (realPlay > 30000)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play",hours,min);
- }
- else
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play",hours,min);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement