给定区间 [−2^31,2 ^31] 内的 3 个整数 A、B 和 C,请判断 A+B 是否大于 C。对每组测试用例,在一行中输出 Case #X: true 如果 A+B>C,否则输出 Case #X: false,其中 X 是测试用例的编号(从 1 开始)。
代码实现:import java.util.*;
public class Test {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int T=input.nextInt();
//整型的范围为-2^31~2^31-1
int arr[][]=new int[T][3];
for(int i=0;iarr[i-1][2]){
System.out.println("Case #"+i+":true");
}
else{
System.out.println("Case #"+i+":false");
}
}
}
}
输入样例和输出结果:



