Световен рекорд по плуване
Някой може ли да ми каже къде са ми грешките (системата ми дава 60 от 100)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
namespace TEST
{
class Program
{
static void Main(string[] args)
{
double record = double.Parse(Console.ReadLine());
double distanceInMeters = double.Parse(Console.ReadLine());
double timeInSeconds = double.Parse(Console.ReadLine());
double delayInSeconds = Math.Floor( distanceInMeters / 15) * 12.5;
double swimmingSeconds = (distanceInMeters * timeInSeconds) + delayInSeconds;
string newStr = string.Format("{0:0.00}", Math.Abs(record - swimmingSeconds));
if (swimmingSeconds >= record)
{
Console.WriteLine("No, he failed! He was {0} seconds slower.", newStr);
}
else
{
Console.WriteLine( "Yes, he succeeded! The new world record is {0} seconds.", Math.Round( swimmingSeconds , 2));
}
}
}
}
//