EX09 - Spice Must Flow
Някой има ли представа на това какъв му е случаят, че дава 57 / 100 в Джъджа?
using System;
using System.Numerics;
namespace EX09_Spice_Must_Flow
{
    class MineProduction
    {
        static void Main()
        {
            BigInteger startingYeld = BigInteger.Parse(Console.ReadLine());
            BigInteger produced = 0;
            BigInteger days = 0;
            while (startingYeld >= 100)
            {
                produced += startingYeld - 26;
                startingYeld -= 10;
                days++;
            }
produced -= 26;
            Console.WriteLine(days);
            Console.WriteLine(produced);
        }
    }
}
Благодаря за насоката. И аз не съобразих да проверя за <100.
При мен тръгна така:
int yeld = int.Parse(Console.ReadLine());
int collect = 0;
int days = 0;
if (yeld >= 100)
{
while (yeld >= 100)
{
days++;
collect += yeld;
yeld -= 10;
}
collect -= (days + 1) * 26;
Console.WriteLine(days);
Console.WriteLine(collect);
}
else
{
Console.WriteLine(days);
Console.WriteLine(collect);
}