Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MountainRun
- {
- class Program
- {
- static void Main(string[] args)
- {
- double record = double.Parse(Console.ReadLine());
- double meters = double.Parse(Console.ReadLine());
- double secondPerMeter = double.Parse(Console.ReadLine());
- double sum = meters * secondPerMeter + Math.Floor(meters/50) * 30;
- if (sum < record)
- {
- Console.WriteLine($" Yes! The new record is {sum:F2} seconds.");
- }
- else
- {
- Console.WriteLine($"No! He was {sum - record:F2} seconds slower.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement