Misixty 0 Точки

## 7. Световен рекорд по плуване - Помощ 70/100

Не разбирам къде ми е проблема,ако някой ми помогне ще съм му много благодарен.

Когато тествам кода всичко ми е ОК, но в Judge ми дава 70/100...?!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp30
{
class Program
{
static void Main(string[] args)
{

double totalsec = distanceinmaters * timeinsec;
double delaysec = Math.Floor(distanceinmaters / 15) * 12.5;

double totalsectime = totalsec + delaysec;

if (totalsec < recordtime)
{
Console.WriteLine(\$"Yes, he succeeded! The new world record is {totalsectime:F2} seconds.");
}
else
{
Console.WriteLine(\$"No, he failed! He was {totalsectime - recordtime:F2} seconds slower.");
}
}
}
}

Тагове:
0
23/01/2020 10:49:07
kkaraivanov 270 Точки

Заповядай! Грешката ти беше в проверката, грешна променлива подаваш

``````using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp30
{
class Program
{
static void Main(string[] args)
{

double totalSec = distanceInMeters * timeInSec;
double delaySec = Math.Floor(distanceInMeters / (double)15);
delaySec *= 12.5;

double totalSecTime = totalSec + delaySec;

if (totalSecTime < recordTime)
{
Console.WriteLine(\$"Yes, he succeeded! The new world record is {totalSecTime:F2} seconds.");
}
else
{
Console.WriteLine(\$"No, he failed! He was {(totalSecTime - recordTime):F2} seconds slower.");
}
}
}
}``````

0
Misixty 0 Точки

Blagodarq :3

0