6. World Swimming Record
Защо ми дава 80/10?
---------------------------------------------------------------------------------------------------------------
using System;
namespace SwimmingRecord
{
class Program
{
static void Main(string[] args)
{
// Input
double recordInSeconds = double.Parse(Console.ReadLine());
double distance = double.Parse(Console.ReadLine());
double timeInSecondsPerOneMeter = double.Parse(Console.ReadLine());
double timeRequired = distance * timeInSecondsPerOneMeter;
double delay = Math.Floor(distance / 15) * 12.5;
double totalTime = timeRequired + delay;
if (totalTime > recordInSeconds)
{
double timeOff = totalTime - recordInSeconds;
Console.WriteLine($"No, he failed! He was {timeOff:f2} seconds slower.");
}
else
{
Console.WriteLine($"Yes, he succeeded! The new world record is {totalTime:f2} seconds.");
}
}
}
}
Благодаря!