# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22729 | 도치피치피보족 (#40) | Fully Generate (KRIII5_FG) | C++11 | 0 ms | 16740 KiB |
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 <cstdio>
typedef unsigned long long int P;
const P mod = 1000000007;
P index[1000001][2];
P N;
P curr = 3, num = 3, ind = 4;
P p = 1;
P whatindexinnum(P curr){
for (p = p;; p++)
if (curr >= index[p][0] && curr <= index[p][1])
return p;
}
P pow(P x, P y){
if (y == 0) return 1;
else if (y == 1) return x % mod;
if (y & 1) return x % mod* (pow(x, y - 1) % mod);
else return (pow(x % mod, y / 2) % mod * pow(x %mod, y / 2) % mod) % mod;
}
int main(){
P ans = 4;
index[1][0] = index[1][1] = 1;
index[2][0] = 2, index[2][1] = 3;
scanf("%lld", &N);
if (N == 1){ printf("1\n"); return 0; }
else if (N == 2){ printf("2\n"); return 0;}
else if (N == 3){ printf("4\n"); return 0;}
else if (N == 4){ printf("12\n"); return 0;}
while (1){
long long len;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |