提交时间:2023-11-25 16:54:04

运行 ID: 112338

#include<bits/stdc++.h> using namespace std; unsigned long long a[114514]; int main(){ unsigned long long n; cin>>n; a[1] = 1; a[2] = 2; for (int i = 3;i <= n;i++){ a[i] = a[i - 1] + a[i - 2]; } cout<<a[n]<<endl; return 0; }