Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TimeForProject
- {
- class Program
- {
- static void Main(string[] args)
- {
- int time = int.Parse(Console.ReadLine());
- int days = int.Parse(Console.ReadLine());
- int workers = int.Parse(Console.ReadLine());
- var workDays = days * 0.9*8;
- var overTime = days * 2 * workers;
- var workHours = Math.Truncate(overTime + workDays);
- if (workHours >= time)
- {
- Console.WriteLine($"Yes!{workHours - time} hours left.");
- }
- else
- {
- Console.WriteLine($"Not enough time!{time - workHours} hours needed. ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement