| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 141059 | 胡海峰老师 | 桃子问题 | C++ | Wrong Answer | 1 MS | 260 KB | 338 | 2025-12-20 21:31:26 |
#include <iostream> //designed by hu 2025-10 using namespace std; int peach(int day){ if(day==10) { cout << "Day:" << day<< "----"<< 1 <<endl; return 1; } int tot = peach(day+1) * 2 + 2; cout << "Day:" << day<< "----"<< tot<<endl; return tot; } int main(){ int res = peach(1); cout<<res; return 0; }
------Input------
0
------Answer-----
1534
------Your output-----
Day:10----1 Day:9----4 Day:8----10 Day:7----22 Day:6----46 Day:5----94 Day:4----190 Day:3----382 Day:2----766 Day:1----1534 1534