Submission #372254

#TimeUsernameProblemLanguageResultExecution timeMemory
372254kutbilim_oneOdd-even (IZhO11_oddeven)Java
Compilation error
0 ms0 KiB
import java.util.*; import java.math.*; public class IZHO{ public static void main(String args[]){ Scanner cin = new Scanner(System.in); /// 2*n - floor( (1+ sqrt(8*n-7))/2 ) BigInteger n = cin.nextBigInteger(); BigInteger sqrtPart = n.multiply(BigInteger.valueOf(8)).subtract(BigInteger.valueOf(7)).sqrt().add(BigInteger.valueOf(1)).divide(BigInteger.valueOf(2)); BigInteger res = n.multiply(BigInteger.valueOf(2)).subtract(sqrtPart); System.out.print(res); cin.close(); } }

Compilation message (stderr)

oddeven.java:4: error: class IZHO is public, should be declared in a file named IZHO.java
public class IZHO{
       ^
1 error