Submission #22460

#TimeUsernameProblemLanguageResultExecution timeMemory
22460이대회 트래쉬 대회에야옹 (#40)Fully Generate (KRIII5_FG)C++14
2 / 7
9 ms6360 KiB
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <functional> #include <map> #include <set> #include <string> using namespace std; int N, K, T; int con[1111111] = { 0, 1, 2, 2, 3, 3 }; int idx = 6; int main() { cin >> N; int i = 4; while (idx <= N) { int val = con[i]; for (int j = 0; j < val; j++) { con[idx++] = i; if (idx > N) break; } i++; } long long mult = 1; for (int i = 1; i <= N; i++) mult = (mult * con[i]) % 1000000007; cout << mult % 1000000007; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...