[Programming Basic] Exams ,Магазин за детски играчки - Judge ми дава само 60/100
Здравейте , ще може ли малко помощ , че нещо не мога да си намеря грешката в кода :
using System;
namespace date
{
class Program
{
static void Main(string[] args)
{
double PriceOfVacation = double.Parse(Console.ReadLine());
int numOfPuzzles = int.Parse(Console.ReadLine());
int speakingDolls = int.Parse(Console.ReadLine());
int numOfBears = int.Parse(Console.ReadLine());
int Minions = int.Parse(Console.ReadLine());
int trucks = int.Parse(Console.ReadLine());
double amount = (numOfPuzzles*2.60)+(speakingDolls * 3)+(numOfBears*4.10)+(Minions*8.20)+(trucks *2);
int countOfToys = numOfPuzzles + speakingDolls + numOfBears + Minions + trucks;
if (countOfToys >= 50)
{
double calc = amount * 0.25;
double LastPrice = amount - calc;
double rent = 0.10 * LastPrice;
double profit = LastPrice - rent;
if (profit >= PriceOfVacation)
{
var caalc = Math.Abs(profit - PriceOfVacation);
Console.WriteLine("Yes! {0} lv left.", ($"{caalc:F2}"));
}
}
else if (countOfToys < 50)
{
double rent = 0.10 * amount;
double profit = amount - rent;
if (profit < PriceOfVacation)
{
double caal = Math.Abs(PriceOfVacation - profit);
Console.WriteLine("Not enough money! {0} lv needed.", ($"{caal:F2}"));
}
}
}
}
}