~cpp
#include <stdio.h>
int cycle_length(int n); // cycle_length를 는
void main()
{
int i_num, j_num; // 는
int max = 0; // 대 0 는
scanf("%d %d", &i_num, &j_num); // 를 받는
for ( ;i_num<j_num;i_num++ ) // cycle_length
// 대
max = max<cycle_length(i_num)?cycle_length(i_num):max;
printf("%d\n", max); // 대
}
int cycle_length(int n)
{
int count = 1; //
while ( n!=1 ) {
if ( n%2!=0 )
n = n*3+1;
else n /= 2;
count++;
}
return count;
}










