Submission #9730

#TimeUsernameProblemLanguageResultExecution timeMemory
9730httraceWiring (kriii2_W)C++98
1 / 4
1000 ms1676 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...