五十求调QAQ

P1255 数楼梯

vector_STL_ @ 2024-10-22 22:19:17

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
#define int unsigned long long

signed main(){
    int a;
    cin>>a;
    int f[10000];
    f[0]=1;
    f[1]=1;
    if(a==1){
        cout<<1<<"\n";
    }
    else{
        for(int i=2;i<=a;i++){
            f[i]=f[i-1]+f[i-2];
        }
    }
    cout<<f[a];

}

by IAKIOI66666 @ 2024-10-22 22:22:46

高精度呀


by dongzirui0817 @ 2024-10-22 22:27:54

@vectorSTL 这题不用高精度的,你还是第 N


by ZeHong_Wang @ 2024-10-22 22:33:46

@vectorSTL 是真要高精度啊...


by vector_STL_ @ 2024-10-22 22:38:13

???


|