Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace cleaning
- {
- public class cleaning
- {
- public static void Main(string[] args)
- {
- double a = double.Parse(Console.ReadLine());
- double b = double.Parse(Console.ReadLine());
- double c = double.Parse(Console.ReadLine());
- double d = double.Parse(Console.ReadLine());
- double time = 1 / (1 / a + 1 / b + 1 / c);
- double totalTime = time * 1.15;
- double timeLeft = d - totalTime;
- if (timeLeft > 0)
- {
- Console.WriteLine($"Cleaning time: {totalTime:f2}");
- Console.WriteLine($"Yes, there is a surprise - time left -> {Math.Floor(timeLeft)} hours.");
- }
- else
- {
- Console.WriteLine($"Cleaning time: {totalTime:f2}");
- Console.WriteLine($"No, there isn't a surprise - shortage of time -> {Math.Ceiling(Math.Abs(timeLeft))} hours.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement