很简单的一个题目,纯粹暴力解决。而且现在已经证明了此问题不可描述。。。 public class PE14 { /** * @param args */ public static int p14(long n) { int count = 0; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { n = (3 * n + 1); } count++; } return count; } public static void main(String[] args) { int max = 0; int num = 0; for (int i = 1; i <= 1000000; i++) { int temp = p14(i); if (temp > max) { num = i; max = temp; } } System.out.println(max + "/t" + num); // TODO Auto-generated method stub } } Answer: 837799