美文网首页
1065 A+B and C (64bit) (20 分)

1065 A+B and C (64bit) (20 分)

作者: 79d12e22ec53 | 来源:发表于2019-07-30 18:57 被阅读0次
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main(int argc, char *argv[]) {
    int T, tCase = 1;
    scanf("%d", &T);
    while(T--) {
        long long a, b, c;
        scanf("%lld %lld %lld", &a, &b, &c);
        long long res = a + b;
        bool flag;
        if(a > 0 && b > 0 && res < 0) flag = true;
        else if (a < 0 && b < 0 && res >= 0) flag = false;
        else if(res > c) flag =true;
        else flag = false;
        if(flag == true) {
            printf("Case #%d: true\n", tCase++);
        } else {
            printf("Case #%d: false\n", tCase++);
        }
    }
}






相关文章

网友评论

      本文标题:1065 A+B and C (64bit) (20 分)

      本文链接:https://www.haomeiwen.com/subject/idlorctx.html