60分求助

P1255 数楼梯

徐殿崴2011 @ 2023-05-28 19:31:49

#include<iostream>
using namespace std;
long long n, f[1000005], tmp;
int main() {
    cin >> n;
    f[1] = 1;
    f[2] = 2;
    for(int i = 3;i <= n; i++)
    {
        f[i] = f[i - 1] + f[i - 2];
    }
    cout << f[n] ;
}

很急,在线等


by wyh0413 @ 2023-06-01 07:08:02

高精度加法


by biggay002 @ 2023-06-20 16:00:33

没有高精度ww


|