提交时间:2026-04-25 20:07:46
运行 ID: 437964
#include<iostream> using namespace std; long long hsg(int x){ if(x==1) return 1; else return (hsg(x-1)+1)*2; } int main(){ int n; cin>>n; cout<<"total="<<hsg(n); return 0; }