Programming Basics Exam - 17 July 2016, Harvest задача, не дава 100 точки в Judge
Здравейте,
Имам въпрос за една от задачите на Programming Basics Exam - 17 July 2016, Harvest задачата. Тествах в Judge-a обаче ми дава 50 точки, а когато тествам кода на конзолата с примерните цифри от самата задача всичко работи. Някои знае ли къде е грешката и как да си взема 100 от 100 :)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
var SizeLoze = double.Parse(Console.ReadLine());
var Grozde = double.Parse(Console.ReadLine());
var RequiredLitterWine = double.Parse(Console.ReadLine());
var Employees = double.Parse(Console.ReadLine());
var SizeWine = SizeLoze * Grozde;
var Wine = (0.40 * SizeWine) / 2.5;
if (Wine > RequiredLitterWine)
{
var Diff = (Wine - RequiredLitterWine);
var Diff1 = Diff / Employees;
Console.WriteLine("Good harvest this year! Total wine: {0:0} liters.", Wine);
Console.WriteLine("{0} liters left -> {1} liters per person.", Diff, Diff1 );
}
else if (Wine < RequiredLitterWine)
{
var Diff = (RequiredLitterWine - Wine);
var Diff1 = Diff / Employees;
Console.WriteLine("It will be a tough winter! More {0:0} liters wine needed.", Diff);
}
}
}
}
Къде бъркам , че ми дава 90/100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Harvest
{
class harvest
{
static void Main(string[] args)
{
var X = int.Parse(Console.ReadLine());
var Y = double.Parse(Console.ReadLine());
var needL = int.Parse(Console.ReadLine());
var workers = int.Parse(Console.ReadLine());
var Harvest = X * Y;
var wine = 0.4 * Harvest / 2.5;
if (wine >= needL)
{
var delta = Math.Ceiling(wine - needL);
var needPerson = Math.Ceiling(delta / workers);
Console.WriteLine("Good harvest this year! Total wine: {0} liters.", wine);
Console.WriteLine("{0} liters left -> {1:0} liters per person.", delta, needPerson);
}
else
{
var delta = Math.Floor(needL - wine);
Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", delta);
}
}
}
}
GapoBG малка грешка
using System;
namespace Harvest
{
class harvest
{
static void Main(string[] args)
{
var X = int.Parse(Console.ReadLine());
var Y = double.Parse(Console.ReadLine());
var needL = int.Parse(Console.ReadLine());
var workers = int.Parse(Console.ReadLine());
var Harvest = X * Y;
var wine = 0.4 * Harvest / 2.5;
if (wine >= needL)
{
var delta = Math.Ceiling(wine - needL);
var needPerson = Math.Ceiling(delta / workers);
Console.WriteLine("Good harvest this year! Total wine: {0} liters.",Math.Floor(wine));
Console.WriteLine("{0} liters left -> {1:0} liters per person.", delta, needPerson);
}
else
{
var delta = Math.Floor(needL - wine);
Console.WriteLine("It will be a tough winter! More {0} liters wine needed.", delta);
}
}
}
}