Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
82635 sh25_shenpy 吃糖果 C++ 无测评数据 0 MS 0 KB 251 2026-01-16 18:15:13

Tests(0/1):


#include<iostream> using namespace std; int f(int n){ if(n<=2) return n-1; 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; }


测评信息: