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);
}
}