Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Skeleton
- {
- class Program
- {
- static void Main(string[] args)
- {
- int minutes = int.Parse(Console.ReadLine());
- int seconds = int.Parse(Console.ReadLine());
- double lengthInMeters = double.Parse(Console.ReadLine());
- double secondsFor100Meters = double.Parse(Console.ReadLine());
- int control = minutes * 60 + seconds;
- double time = lengthInMeters / 100 * secondsFor100Meters - lengthInMeters / 120 * 2.5;
- if (time <= control)
- {
- Console.WriteLine($"Marin Bangiev won an Olympic quota!\nHis time is { time:f3}.");
- }
- else
- {
- Console.WriteLine($"No, Marin failed! He was { time - control:f3} second slower.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement