Advertisement
Kamigawa

4.13Work Hours

Oct 7th, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. using System;
  2.  
  3. class WorkHours
  4. {
  5. static void Main(string[] args)
  6. {
  7. long h = long.Parse(Console.ReadLine()); //project hours
  8. long d = long.Parse(Console.ReadLine()); //days before deadline
  9. int p = int.Parse(Console.ReadLine()); //productivity as %
  10. int workHours = 12;
  11. decimal daysBiking = d * 0.1M; //10% biking
  12. decimal daysWorking = d - daysBiking;
  13. decimal totalWorkHours = workHours * daysWorking * p;
  14. totalWorkHours = (long)totalWorkHours / 100;
  15. if (totalWorkHours >= h)
  16. {
  17. Console.WriteLine("Yes");
  18. }
  19. else
  20. {
  21. Console.WriteLine("No");
  22. }
  23. decimal diff = totalWorkHours - h;
  24. Console.WriteLine((long)diff);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement