HDU 5650 so easy

n不为1的时候输出a[1],否则输出0

#include<cstdio>
#include<cstring>
#include<cmath>
#include<queue>
#include<algorithm>
using namespace std;

long long y[2000];

int main()
{
    int n;
    int T;
    scanf("%d",&T);

    while(T--)
    {
        scanf("%d",&n);
        long long ans;
        for(int i=1;i<=n;i++) scanf("%lld",&y[i]);
        if(n==1) ans=y[1];
        else ans=0;
        printf("%lld
",ans);
    }
    return 0;
}
原文地址:https://www.cnblogs.com/zufezzt/p/5324997.html