World Swimming Record 80 / 100
Здравейте колеги,
Бих желал да попитам как мога да разбера, защо не получавам пълния брой точки на тази задача, а само 80 / 100 ?
Когато отворя таб "Details" виждам че две от проверките връщат грешка, а именно:
Test #1 (Incorrect answer)
The process executing your submission for this test may not have received the output successfully. Please try to submit again the same solution. If the result does not change, then search the error in the submission itself.
Test #9 (Incorrect answer)
The process executing your submission for this test may not have received the output successfully. Please try to submit again the same solution. If the result does not change, then search the error in the submission itself.
Всички останали проверки връщат коректен отговор.
Пробвах да събмитна кода 3 пъти, резултатът не се променя.
Ще се радвам, ако някой може да ме насочи как да проверя грешката, или къде бъркам в кода по-долу:
using System;
namespace WorldSwimmingRecord
{
class Program
{
static void Main(string[] args)
{
//input
//in seconds
double worldRecord = double.Parse(Console.ReadLine());
//in meters
double distance = double.Parse(Console.ReadLine());
//in seconds
double timeOneMeter = double.Parse(Console.ReadLine());
//logic
double waterResistance = 12.5;
double waterResistanceDistance = 15;
double realSpeedCorrection = (Math.Floor(distance/waterResistanceDistance)*waterResistance);
double ivansTime = (distance * timeOneMeter) + realSpeedCorrection;
double timeDifference = worldRecord - ivansTime;
//output
if (ivansTime < worldRecord)
{
Console.WriteLine($"Yes, he succeeded! The new world record is {ivansTime:F2} seconds.");
}
else if (ivansTime > worldRecord)
{
Console.WriteLine($"No, he failed! He was {Math.Abs(timeDifference):F2} seconds slower.");
}
}
}
}