import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner myInput = new Scanner( System.in );
int a = myInput.nextInt();;
int y = 1;
while (y > 0) {
while (a > 50) {
a = a + 1;
y = y + 1;
if (a > 10) {
if (a > 100) {
a = a * 5;
break;
} else {
y = y / a;
}
}
}
}
System.out.println(y);
}
}
public static void main(String[] strArr) {
int nextInt = new Scanner(System.in).nextInt();
int i = 1;
L2:
if (i <= 0) goto L20;
L4:
if (nextInt <= 50) goto L2;
nextInt = nextInt + 1;
i = i + 1;
if (nextInt <= 10) goto L4;
if (nextInt > 100) goto L14;
i = i / nextInt;
goto L4
L14:
nextInt = nextInt * 5;
goto L2
L20:
System.out.println(i);
}
最终翻译为伪代码
public static void main(String[] strArr) {
int nextInt = new Scanner(System.in).nextInt();
int i = 1;
while (i > 0) {
while (true) {
if (nextInt > 50) {
nextInt++;
i++;
if (nextInt > 10) {
if (nextInt > 100) {
nextInt *= 5;
break;
}
i /= nextInt;
}
}
}
}
System.out.println(i);
}