WRONG ANSWER EVEN THE CUSTUM INPUT GIVES RIGHT ANSWER

for contest ccstart2 problem name ADDNATRAL i am getting wrong answer when i submit it but it gives me right answer for custom input.

the code is:

/* package codechef; // don’t place package name! */

import java.util.*;

import java.io.*;

/* Name of the class has to be “Main” only if the class is public. /
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner s=new Scanner(System.in);
int n;
n=s.nextInt();
System.out.println(n
(n+1)/2);
}
}

Just Check your code for the input N=1000000(10^6)

And You Can Simply Find Why it’s giving Wrong Answer.

Now Debug that error.

Happy Coding…

1 Like

yes thanks for kind reply ,i got the solution