随笔分类 -  3.1.简单模拟

摘要:水题。 #include"iostream" using namespace std; int main() { int n,ans = 0; cin>>n; while(n != 1) { if(n % 2==0) n/=2; else n=(3*n+1)/2; ans++; } cout<<an 阅读全文
posted @ 2020-02-14 20:30 tangq123 阅读(139) 评论(0) 推荐(0)