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 silvanadoc
- {
- class silvanadoc
- {
- static void Main(string[] args)
- {
- int daysOff = int.Parse(Console.ReadLine());
- int workDays = 365 - daysOff;
- int playMinutesWork = workDays * 63;
- int playMinutesOff = daysOff * 127;
- int fullTimePlaying = playMinutesWork + playMinutesOff;
- int restMinutes = (30000 - fullTimePlaying);
- int hours = Math.Abs(restMinutes) / 60;
- int minutes = Math.Abs(restMinutes) % 60;
- if (fullTimePlaying > 30000)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($"{hours} hours and {minutes} minutes more for play");
- }
- else if (fullTimePlaying <= 30000)
- {
- 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