Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
29724 惠子铭 角谷猜想 C++ Accepted 0 MS 252 KB 344 2023-11-02 18:53:51

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; for(int i=1;;i++){ if(a==1){ cout<<"End"; break; } if(a%2==1){ cout<<a<<"*3+1="; a=a*3+1; cout<<a<<endl; } else{ cout<<a<<"/2="; a=a/2; cout<<a<<endl; } } }


Judgement Protocol: