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 SleepyTomCat
- {
- class Program
- {
- static void Main(string[] args)
- {
- //брой почивни дни
- int relaxDays = int.Parse(Console.ReadLine());
- int yearDays = 365;
- int restDays = yearDays - relaxDays;
- int MinutesForPlay = relaxDays * 127 + restDays * 63;
- int MinutesPlayingForAYear = 30000;
- int HoursPlayingForAYear = MinutesPlayingForAYear / 60;
- int hoursForPlay = 0;
- //• Когато е на работа, стопанинът му си играе с него по 63 минути на ден.
- //• Когато почива, стопанинът му си играе с него по 127 минути на ден.
- for (MinutesForPlay = 0; MinutesForPlay <= 59; MinutesForPlay++)
- {
- hoursForPlay++;
- }
- if(MinutesForPlay > 30000)
- {
- int DifferentHoursMinus = hoursForPlay - HoursPlayingForAYear;
- int DifferentMinutesMinus = MinutesForPlay - MinutesPlayingForAYear;
- Console.WriteLine("Tom will run away!");
- Console.WriteLine($"{DifferentHoursMinus} hours and {DifferentMinutesMinus} minutes more for play");
- }
- else
- {
- int DifferentHoursPlus = HoursPlayingForAYear - hoursForPlay;
- int DifferentMinutesPlus = MinutesPlayingForAYear - MinutesForPlay;
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{DifferentHoursPlus} hours and {DifferentMinutesPlus} minutes less for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement