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 Tom
- {
- class Program
- {
- static void Main(string[] args)
- {
- var freeDays = double.Parse(Console.ReadLine());
- var norma = 30000;
- var dayWork = 63;
- var dayVacanc = 127;
- var year = 365-freeDays;
- var result1 = (year * dayWork) + (dayVacanc * freeDays);
- var result2 = norma-result1;
- var h = Math.Truncate(Math.Abs(result2 / 60));
- var min =Math.Truncate(Math.Abs(result2 % 60));
- if (norma > result1)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine("{0} hours and {1} minutes less for play", h, min);
- }
- if (norma < result1)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine("{0} hours and {1} minutes more for play", h, min);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment