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 holidays = int.Parse(Console.ReadLine());
- int workdays = 365 - holidays;
- int timeToPlay = workdays * 63 +holidays*127;
- int normToPlay = 30000;
- int normDiff = Math.Abs(normToPlay - timeToPlay);
- int hourDiff = normDiff / 60;
- int minDiff = normDiff % 60;
- //Console.WriteLine(timeToPlay);
- if (timeToPlay>normToPlay)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play", hourDiff, minDiff);
- }
- else if (timeToPlay < normToPlay)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play", hourDiff, minDiff);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement