wind_city_Rose @ 2024-10-08 13:03:46
#include<bits/stdc++.h>
using namespace std;
long long n,a[5020];
int main()
{
cin>>n;
a[1]=1;
a[2]=2;
for(int i=3;i<=5000;i++){
a[i]=a[i-1]+a[i-2];
}
cout<<a[n];
return 0;
}
60分,救救我吧,dalao们
by RikkaTakanashi @ 2024-10-08 13:05:04
@wind_city_Rose 要高精度
by dongzirui0817 @ 2024-10-08 13:10:06
@wind_city_Rose 高精啊,孩子
by litangzheng @ 2024-10-08 13:37:45
不管你是long long
还是unsigned long long
还是__int128
都是60分,要高精度。
by AA_rui @ 2024-10-11 14:12:03
@RikkaTakanashi 什么是高精度?我是新手
by AC_kkk0926 @ 2024-10-19 20:42:29
@AA_rui 用代码模拟算数(+ - * /)