| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 90881 | sh25_wangsj | 吃糖果 | C++ | 无测评数据 | 0 MS | 0 KB | 249 | 2026-06-12 14:42:01 |
#include<iostream> using namespace std; int f(int n){ if(n==1) return 0; else if(n<=4) return 1; else return f(n-2)+f(n-3); } int main(){ int n; while(cin>>n){ if(n!=0) cout<<f(n)<<endl; } return 0; }