Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
83408 sh25_shengmy 吃糖果 C++ 通过 0 MS 252 KB 226 2026-01-25 21:02:18

Tests(1/1):


#include<bits/stdc++.h> using namespace std; long long f[21]; int main(){ int n; 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]; return 0; }


测评信息: