codechef SEPT-14 question, rainbow array input/output format?

is this the correct input/output format for this question

int main(){

cin >> num;

//no test cases or multiple inputs, only once i/o??

cout << answer << endl;

return 0;}

yes that is the i/o format

include “\n” for newline, cout is replaced with file input output so may be endl doesn’t count, not sure

No, endl still counts as “\n” and flush.

1 Like
//