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