結果
問題 | No.3100 始業式 |
ユーザー | aguroshou |
提出日時 | 2023-03-31 23:07:34 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 1,766 ms |
コンパイル使用メモリ | 166,332 KB |
実行使用メモリ | 4,372 KB |
最終ジャッジ日時 | 2023-10-24 09:36:16 |
合計ジャッジ時間 | 2,221 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
ソースコード
#include <bits/stdc++.h> #include <iostream> #include <vector> #include <algorithm> #include <iomanip> using namespace std; typedef long long ll; int main() { ll t, n, f, answer; cin >> t; for (ll i = 0; i < t; i++) { cin >> n; answer = 0; for (ll k = 0; k < n; k++) { cin >> f; if (f == 1) { answer++; } } cout << answer << endl; } return 0; }