Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
333322 | 黄浙峰老师 | 【C6-5】猴子吃桃 | C++ | 通过 | 100 | 4 MS | 236 KB | 197 | 2025-07-16 14:55:43 |
#include<bits/stdc++.h> using namespace std; int n; int f(int m){ if(m==n){ return 1; }else{ return 2*(f(m+1)+1); } } int main(){ cin>>n; cout<<"total="<<f(1); return 0; }