Submission #5744

#TimeUsernameProblemLanguageResultExecution timeMemory
5744hana5505입력숫자 (KOI13_mystery)C++98
100 / 100
0 ms1088 KiB
#include<stdio.h> int NUM[101]; int ar[101]; int ans[101]; int main(){ int i, token, N; int count = 0, from = 0, value; scanf("%d", &N); for (i = 0; i < N; i++){ scanf("%d", &token); NUM[i] = token; ar[i] = token; } printf("%d\n", N); for (i = 0; i < N; i++){ ans[from] = ar[i]; if (i == N - 1) break; from = (from + ar[i]) % N; while (ans[from]!=0) from = (from + 1) % N; } for (i = 0; i < N; i++) printf("%d ", ans[i]); return(0); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...