Tag: collat​​z

Uva的3n + 1问题

我正在解决Uva的3n + 1问题,我不明白为什么法官拒绝我的回答。 时间限制尚未超过,我尝试过的所有测试用例到目前为止都运行正常。 import java.io.*; public class NewClass{ /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int maxCounter= 0; int input; int lowerBound; int upperBound; int counter; int numberOfCycles; int maxCycles= 0; int lowerInt; BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in)); String line = consoleInput.readLine(); String […]