Submission #48143688 on A. Integer Sequence Dividing in Codeforces Round #531 (Div. 3)

Revision en1, by vjindal23, 2019-01-10 12:00:06

While I submitted, my solution was accepted but now I check next day to know my ranking it shows that in last test case no output is printed. I tried same code with that input on my laptop and it works fine. Can someone point the mistake?

Error: "wrong output format Unexpected end of file — token expected"

Code:

#include <stdio.h>

int main(){ // commented section removed
    int i, j, k;
    long int n;
    scanf("%ld", &n);
    long int sum = 0;
    sum = n*(n+1)/2;
    if(sum%2 == 1) printf("1");
    if(sum%2 == 0) printf("0");
    return 0;
}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English vjindal23 2019-01-10 12:00:06 685 Initial revision (published)