#include int arr[10000001] = { 0 }; int f(long long int n, int cnt) { if (n == 1) return cnt; if (n < 10000001 && arr[n] != 0) return cnt + arr[n]-1; if (n % 2 == 0) n /= 2; else n = n * 3 + 1; return f(n,++cnt); } int main() { int a, b,temp,max=-1,max_index; scanf("%d %d", &a, &b); for (int i = a; i max) { max = temp; max_index = i; } } printf("%d %d", max_index, max); return 0; } 사용자로부터 a, b를 ..