Задача Bike Race от 20 ноември
Странно! Тестовете минават, а в judge ми дава 60/100.
static void Main(string[] args)
{
var junior = int.Parse(Console.ReadLine());
var senior = int.Parse(Console.ReadLine());
var trace = Console.ReadLine();
var juniorprice = 0.0;
var seniorprice = 0.0;
switch (trace)
{
case "cross-county":
juniorprice = 8.00;
seniorprice = 9.50;
if (junior + senior >= 50)
{
juniorprice = juniorprice - juniorprice * 0.25;
seniorprice = seniorprice - seniorprice * 0.25;
}
break;
case "trail":
juniorprice = 5.50;
seniorprice = 7.00; break;
case "downhill":
juniorprice = 12.25;
seniorprice = 13.75; break;
case "road":
juniorprice = 20;
seniorprice = 21.50; break;
}
var total = juniorprice * junior + seniorprice * senior;
var tax = total - total * 0.05;
{
Console.WriteLine("{0:f2}", tax);