/ CYOJ /

记录详情

Accepted


  
Found 4 testcases.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 256.0 KiB
#3 Accepted 3ms 256.0 KiB
#4 Accepted 1ms 256.0 KiB

代码

#include<bits/stdc++.h>
using namespace std;
int main() {
    int a[22] = {0,1,1};
    for(int i = 3;i <= 20;i++) {
        a[i] = a[i - 1] + a[i - 2];
    }
    int b;
    cin>>b;
    cout<<a[b];
}

信息

递交者
类型
递交
题目
P1010 斐波那契数列求数
语言
C++
递交时间
2022-08-29 17:49:45
评测时间
2022-08-29 17:49:45
评测机
分数
100
总耗时
8ms
峰值内存
256.0 KiB