This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#include <iostream>
using namespace std;
int main(){
int a = 0;
int b = 1;
int n;
int count = 0;
scanf("%d",&n);
for(int i = 2 ; a != b ; i++){
count++;
a = b;
b = (b + i) % n;
}
if(n%2) printf("%d",count/2);
else printf("%d",count);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |