#include "iostream" using namespace std; int main() { int m,n,max,tmp,cnt; while(cin >> m >> n) {max = 0; for(int i=(m>n? n:m);i<=(m>n? m:n);++i) { tmp = i; cnt = 1; while(tmp!=1) { if(tmp%2==0) tmp = tmp/2; else tmp = tmp*3 + 1; cnt++; } (max < cnt? max=cnt : max = max); } cout << m << " " << n << " " << max << endl; } }
0.0分
0 人评分