~cpp
#include <iostream>
using namespace std;
int CheckCount (int low, int high){
int temp;
int count = 1;
int maxCount = 0;
temp = low;
while(temp<high){
count = 1;
while(temp !=1){
if(temp % 2 == 1)
temp = 3 * temp + 1;
else
temp = temp / 2;
count++;
}
temp = ++low;
if(count > maxCount)
maxCount = count;
}
return maxCount;
}
void main(){
cout << "2개 값 " << endl;
int num1, num2;
cin >> num1 >> num2;
cout << "MAX cycle-length값 " << CheckCount(num1,num2) << "." << endl;
}
ㅠㅠ
꼈
...
고
경
꺼
...
.. 1과 1000000
고
...