A1065 A+B and C (64bit) (20分)【C语言】
这道题很简单,判断A+B与C的关系即可,注意ABC的范围超过了int范围,需要用long long 类型。
还要注意,A+B的和可能会产生正溢出和负溢出,这两种情况要考虑到
题目描述:
Given three integers A, B and C in [−2 63 ,2 63 ], you are supposed to tell whether A+B>C.
输入格式:
The first line of the input gives the positive number of test cases, T (≤10). Then T test cases follow, each consists of a single line containing three integers A, B and C, separated by single spaces.
输出格式:
For each test case, output in one line Case #X: true if A+B>C, or Case #X: false otherwise, where X is the case number (starting from 1).
输入样例: