-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patha.cpp
42 lines (36 loc) · 949 Bytes
/
a.cpp
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
36
37
38
39
40
41
42
// #pragma GCC optimize(2)
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mkp(x, y) make_pair((x), (y))
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long LL;
typedef double db;
typedef pair<int, int> PII;
void solve() {
const int n = 1e8;
int f1 = 0, f2 = 1;
int res = 1;
for (int i = 1; i < n; i++) {
res = f1+f2;
f1 = f2;
f2 = res;
}
cout << res << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed; // << setprecision(20); // double
// freopen("i.txt", "r", stdin);
// freopen("o.txt", "w", stdout);
// time_t t1 = clock();
int Tcase = 1;
// cin >> Tcase; // scanf("%d", &Tcase);
while (Tcase--)
solve();
// cout << "time: " << 1000.0 * (1.*(clock() - t1) / CLOCKS_PER_SEC) << "ms\n";
return 0;
}