|
|
back to boardJava runtime error - SOLVED Posted by IFrank 6 Dec 2018 21:41 In Idea my code works, but here is a runtime error: import java.util.Scanner; public class MathematiciansAndBerries { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); byte a1 = scanner.nextByte(); byte b1 = scanner.nextByte(); byte a2 = scanner.nextByte(); byte b2 = scanner.nextByte(); byte a3 = scanner.nextByte(); byte b3 = scanner.nextByte(); System.out.println((a1 - a3) + " " + (b1 - b2)); } } Help pls, why runtime error occurs? Edited by author 06.12.2018 21:47 Re: Java runtime error Posted by IFrank 6 Dec 2018 21:47 Changed byte to int and now it works ok here. Idiotic. I don't think a mathematician can bring more than 127 kg)) Re: Java runtime error "0 <= ai, bi <= 10,000" Sure, do not read condition is idiotic. |
|
|