Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace pluvane
- {
- class Program
- {
- static void Main(string[] args)
- {
- var record = double.Parse(Console.ReadLine());
- var metri = double.Parse(Console.ReadLine());
- var vreme = double.Parse(Console.ReadLine());
- double razstoqnie = metri * vreme;
- double dobavka = Math.Floor(metri/15)*12.5;
- double totaltime = razstoqnie + dobavka;
- if (record<=totaltime)
- {
- double nedostig = totaltime - record;
- Console.WriteLine($"No, he failed! He was {nedostig:f2} seconds slower.");
- }
- else
- {
- Console.WriteLine($"Yes, he succeeded! The new world record is {totaltime:f2} seconds.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement