【PAT】B1011 A+B 和 C

注意数据的范围,使用long long就行了

#include<stdio.h>

int main(){
    int N;scanf("%d",&N);
    for(int i=1;i<=N;i++){
        long long A,B,C;
        scanf(" %ld%ld%ld",&A,&B,&C);
        A+=B;
        if(A>C)
            printf("Case #%ld: true
",i);
        else
            printf("Case #%ld: false
",i);
    }
    return 0;
}

原文地址:https://www.cnblogs.com/hebust/p/9813298.html