2018/12/08 L1-036 A乘以B Java
简单的题目, 就是考察简单的输入和乘法:
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); int A = Integer.parseInt(str[0]); int B = Integer.parseInt(str[1]); int final_num = 0; if (Math.abs(A) <= 100 && Math.abs(B) <= 100) { final_num = A * B; System.out.print(final_num); } else { return; } } }