Programming Basics Online Exam - 7 January 2018 -02. Airplane
Здравейте! Решавам задачата и в judge ми излиза 80/100. Къде греша?
import java.util.Scanner;
public class Airplane02 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int h =Integer.parseInt(scanner.nextLine());
int m = Integer.parseInt(scanner.nextLine());
int t = Integer.parseInt(scanner.nextLine());
int sum=(t+m)/60;
int min=(t+m)%60;
int finalHours= sum+h;
if (finalHours>24){
finalHours-=24;
}
System.out.printf("%sh ",finalHours);
System.out.printf("%sm",min);
}
}