//no package name //import when necessary import java.util.Scanner; //it has to be Main class public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); //Wrong answer when using while(true) while(input.hasNext()){ int a = input.nextInt(), b = input.nextInt(); System.out.println(a+b); } } }
原文地址:https://www.cnblogs.com/Vivianwang/p/10968583.html
时间: 2024-10-07 22:50:18