Brush(I) 水

来源:互联网 发布:空间大师淘宝 编辑:程序博客网 时间:2024/05/16 07:33
主要是:被题意杀了......表示原来的"\n" 没有打,就变成了WA
#include <iostream>#include <stdio.h>#include <algorithm>#include <cstring>using namespace std;int T,n;int  main(){    scanf("%d",&T);    for(int loc=1; loc<=T; loc++)    {        int x;        long long ans=0;        scanf("%d",&n);        for(int i=1; i<=n; i++)        {            scanf("%d",&x);            if(x>0) ans+=x;        }        printf("Case %d: %lld\n",loc,ans);    }    return 0;}
原创粉丝点击