|
|
back to boardCommon Boardв компиляторе работает, а тут runtime error Posted by Radian 15 Mar 2016 05:57 В компиляторе работает а тут пишет ошибку. import java.util.*; import java.math.*; import java.io.*; public class koren { public static void main(String[] args) {
Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int a = in.nextInt(); int b = in.nextInt(); int c = in.nextInt(); int d = in.nextInt();
System.out.format("%.4f%n", Math.sqrt (a)); System.out.format("%.4f%n", Math.sqrt (b)); System.out.format("%.4f%n", Math.sqrt (c)); System.out.format("%.4f%n", Math.sqrt (d));
} } Edited by author 15.03.2016 05:59 Re: в компиляторе работает, а тут runtime error Good people don't want other people to guess. Good people show task number and type of error and test number - is it definitely "run-time error"? I guess it is "1001 reverse root". In this case you MUST read and understand task. Does task say you have 4 and only 4 integers to read? Task says you have unknown number of 64 bit longs to read. Task also says you should write output in reverse order. Also I think you haven't check task sample locally. Your program should fail during reading "876652098643267843" as 32 bit int. |
|
|