05. Fishing Boat
Здравейте,
всичко ми върви но в judge ми дава 86 / 100.
Моля Ви, помогнете. :)
това ми е кода:
using System;
namespace _5.FishingBoat
{
class Program
{
static void Main(string[] args)
{
int groupBudget = int.Parse(Console.ReadLine());
string season = Console.ReadLine();
int numberOfFishermen = int.Parse(Console.ReadLine());
double rentTheShip = 0;
if (season == "Spring")
{
rentTheShip = 3000;
}
else if (season == "Summer" || season == "Autumn")
{
rentTheShip = 4200;
}
else if (season == "Winter")
{
rentTheShip = 2600;
}
if (numberOfFishermen <= 6)
{
rentTheShip *= 0.9;
}
else if (numberOfFishermen > 6 && numberOfFishermen <= 11)
{
rentTheShip *= 0.85;
}
else
{
rentTheShip *= 0.75;
}
if (numberOfFishermen % 2 == 0 && season != "Autumn")
{
rentTheShip *= 0.95;
}
if (groupBudget > rentTheShip)
{
double budgetIsEnough = groupBudget - rentTheShip;
Console.WriteLine($"Yes! You have {budgetIsEnough:f2} leva left.");
}
else if (groupBudget <= rentTheShip)
{
double amountIsNotReached = rentTheShip - groupBudget;
Console.WriteLine($"Not enough money! You need {amountIsNotReached:f2} leva.");
}
}
}
}
Благодаря предварително :)