crush_blood @ 2023-12-24 11:15:40
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
long long a[5005];
a[1]=1;
a[2]=2;
cin>>n;
for(int i=3;i<=n;i++)
{
a[i]=a[i-1]+a[i-2];
}
cout<<a[n];
}
by wei2013 @ 2023-12-24 11:17:37
用高精度
by xpc2024 @ 2024-01-01 12:23:05
@crush_blood 得高精度,n的数据范围不止50,有个点就是500,用高精度加法。
by crush_blood @ 2024-01-27 15:23:22
@xpc2024 高精度咋写啊
by xpc2024 @ 2024-01-27 17:18:13
@crush_blood 百度学一下