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