結果
問題 | No.3100 始業式 |
ユーザー | Asahi |
提出日時 | 2023-03-31 21:44:09 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 487 bytes |
コンパイル時間 | 3,021 ms |
コンパイル使用メモリ | 73,968 KB |
実行使用メモリ | 62,288 KB |
最終ジャッジ日時 | 2023-10-24 07:36:01 |
合計ジャッジ時間 | 3,702 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
ソースコード
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int i = 0; i < t; i++) { int n = sc.nextInt(); int count = 0; for (int j = 0; j < n; j++) { int f = sc.nextInt(); if (f == 1) { count++; } } System.out.println(count); } } }