結果

問題 No.3100 始業式
ユーザー daiotadaiota
提出日時 2023-03-31 23:07:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 1,537 ms
コンパイル使用メモリ 166,760 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 09:35:36
合計ジャッジ時間 2,025 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<string,string> P;
typedef pair<int,P> Q;
#define REP(i,n) for(int i=0;i<int(n);i++)

int c[70];

int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
    int i,j,k;

    int T;
    cin >> T;

    while(T--){
    	int N;
    	cin >> N;
    	REP(i,N){
    		int f;
    		cin >> f;
    		c[i+1]+=f;
    	}

    	int ans=0;
    	for(i=1;i<=N;i++) if(c[i]!=0) ans++;
    	cout << ans << endl;
    }




	return 0;
}
0