Toy shop - работи, но judge дава 90/100 точки и не разбирам защо
using System;
namespace toyshop2
{
class Program
{
static void Main(string[] args)
{
double excursionPrice = double.Parse(Console.ReadLine());
int puzleCount = int.Parse(Console.ReadLine());
int dollsCount = int.Parse(Console.ReadLine());
int bearsCount = int.Parse(Console.ReadLine());
int minionsCount = int.Parse(Console.ReadLine());
int trucksCount = int.Parse(Console.ReadLine());
int totalCount = puzleCount + dollsCount + bearsCount + minionsCount + trucksCount;
double billAmount = (puzleCount * 2.60) + (dollsCount * 3) + (bearsCount * 4.10) + (minionsCount * 8.20) + (trucksCount * 2);
if (totalCount >= 50)
{
billAmount *= 0.75;
}
double rent = billAmount * 0.1;
if (excursionPrice <= billAmount + rent)
{
double diference = billAmount - excursionPrice - rent;
Console.WriteLine($"Yes! {diference:F2} lv left.");
}
else
{
double diference = excursionPrice + rent - billAmount;
Console.WriteLine($"Not enough money! {diference:F2} lv needed.");
}
}
}
}
Благодаря! Това е била грешката. Знака трябва да е минус. Сега judge дава 100/100.