用户输出
1
3
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#23777 | #1132. wzk的欧几里得 | Accepted | 100 | 16 ms | 304 K | C++ / 346 B | zzzzz | 2020-02-17 22:07:24 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
unsigned long long arr[300] = { 0 };
arr[1] = 1;
arr[0] = 1;
for (int i = 2; i < 300; i++) {
arr[i] = arr[i - 1] + arr[i - 2];
}
for (int i = 0; i < n; i++) {
if (a[i] == 0)
cout << 1 << endl;
else
cout << arr[a[i] + 2] << endl;
}
}
用户输出
3
13
34
3
34
1
21
34
34
21
系统信息
Exited with return code 0
81
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<136 bytes omitted>
1
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
10946
17711
28657
46368
75025
121393
<720 bytes omitted>
用户输出
1
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
10946
17711
28657
46368
75025
121393
196418
317811
514229
832040
<692 bytes omitted>
系统信息
Exited with return code 0
81
17
1
34
27
26
5
51
53
1
32
8
70
26
77
57
42
12
63
42
19
46
74
29
39
78
11
28
23
59
76
16
30
44
5
<135 bytes omitted>
6765
3
24157817
832040
514229
21
86267571272
225851433717
3
9227465
89
806515533049393
514229
234167
<674 bytes omitted>
用户输出
6765
3
24157817
832040
514229
21
86267571272
225851433717
3
9227465
89
806515533049393
514229
23416728348467685
1548008755920
11
<646 bytes omitted>
系统信息
Exited with return code 0