题解 | 字符串输出1.0
字符串输出1.0
https://www.nowcoder.com/practice/85ef91cfe5a6417ba0e9ba6908ef1868
import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextInt()) { // 注意 while 处理多个 case
int a = in.nextInt();
int b = in.nextInt();
System.out.println(a + b);
}
System.out.print("Welcome to ACM / ICPC! \n");
System.out.print("Welcome to ACM / ICPC! \n");
System.out.print("Welcome to ACM / ICPC! \n");
in.close();
}
}
java需要多读代码,构建自己的框架,不要轻易放弃,要保持好的心态对待困难
#今天你投了哪些公司?##你都用AI做什么#
查看21道真题和解析