import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> al = new ArrayList<>();
int count = 1;
while (count != 0){
count = sc.nextInt();
al.add(count);
}
for(int i=al.lastIndexOf(count)-1; i>=0; i--){
System.out.print(al.get(i)+" ");
}
}
}
java实现洛谷P1427小雨的数字游戏
最新推荐文章于 2024-04-20 15:50:46 发布