用户输出
1
3
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#69006 | #1132. wzk的欧几里得 | Accepted | 100 | 11 ms | 276 K | C++ 11 / 642 B | 该起什么名字 | 2022-04-23 15:25:03 |
#include <bits/stdc++.h>
#define F(i, n, m) for (int i = n; i < m; i++)
typedef unsigned long long ull;
typedef long long ll;
using namespace std;
inline int read() {
int num = 0;
char c;
bool flag = false;
while ((c = getchar()) == ' ' || c == '\n' || c == '\r')
;
if (c == '-')
flag = true;
else
num = c - '0';
while (isdigit(c = getchar())) num = num * 10 + c - '0';
return (flag ? -1 : 1) * num;
}
ll f[105];
int main() {
std::ios::sync_with_stdio(false);
ll t;
f[0] = 1, f[1] = 3, f[2] = 5;
F(i, 3, 105) f[i] = f[i - 1] + f[i - 2];
t = read();
while (t--) {
int n;
n = read();
cout << f[n] << endl;
;
}
return 0;
}
用户输出
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