Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
438041 顾鑫辰 【C3-9】角谷猜想 C++ 通过 100 1 MS 244 KB 289 2026-04-25 21:12:54

Tests(10/10):


#include <iostream> using namespace std; int hsg(int n) { if (n==1){ return 0; } if (n%2==0){ return 1+hsg(n/2); } else{ return 1+hsg(3*n+1); } } int main(){ int n; cin>>n; cout<<hsg(n)<<endl; return 0; }


测评信息: