taojunheng @ 2023-04-17 22:15:48
#include<bits/stdc++.h>
using namespace std;
long long a[5001]={1,2};
int main(){
int n;
cin>>n;
for(int i=2;i<=n;i++)
a[i]=a[i-1]+a[i-2];
cout<<a[n-1];
return 0;
}
60分
by taojunheng @ 2023-04-17 22:17:05
都开到long_long了! 还不行!
by LiMX_ @ 2023-04-17 22:19:22
这题要用高精啊qwq
by wangyinghao @ 2023-04-17 22:27:01
@taojunheng 要用高精
by wujinyi @ 2023-05-27 10:07:29
递归了解一下