Harvest-проблем
Здравейте!Може ли да ми помогнете със задачата?Когато я тествам ми дава верни резултати,но в judge ми дава 90/100.Проверих дали не съм пропуснала някоя запетая,интервал - не е това.
import java.util.Scanner;
public class Harvest {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int x = Integer.parseInt(scanner.nextLine());
double y = Double.parseDouble(scanner.nextLine());
int z = Integer.parseInt(scanner.nextLine());
int workerNum = Integer.parseInt(scanner.nextLine());
double grapekg = x*y;
double winel = (0.40*grapekg)/2.5;
if(winel<z){
double not = Math.floor(z-winel);
System.out.printf("It will be a tough winter! More %.0f liters wine needed.",not);
}else{
winel=Math.floor(winel);
double left = Math.ceil(winel-z);
double result = Math.ceil(left/workerNum);
System.out.printf("Good harvest this year! Total wine: %.0f liters.%n",winel);
System.out.printf("%.0f liters left -> %.0f liters per person.",left,result);
}
}
}