Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace WorkHours
- {
- class WorkHours
- {
- public static void Main(string[] args)
- {
- int h = int.Parse(Console.ReadLine());
- int d = int.Parse(Console.ReadLine());
- int p = int.Parse(Console.ReadLine());
- double normalWorkDay = 12;
- double daysAfterBiking = (double)((double)d - ((double)d * 0.1));
- double hoursAfterBiking = (double)(daysAfterBiking * normalWorkDay);
- double efficientHours = (double)(hoursAfterBiking * ((double)p / 100));
- int efficientWorkHours = (int)Math.Floor(efficientHours);
- if(efficientWorkHours >= h)
- {
- Console.WriteLine("Yes");
- Console.WriteLine(efficientWorkHours - h);
- }
- else
- {
- Console.WriteLine("No");
- Console.WriteLine(efficientWorkHours - h);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment