結果

問題 No.3100 始業式
ユーザー AsahiAsahi
提出日時 2023-03-31 21:39:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 983 bytes
コンパイル時間 2,196 ms
コンパイル使用メモリ 75,772 KB
実行使用メモリ 62,180 KB
最終ジャッジ日時 2023-10-24 07:30:51
合計ジャッジ時間 3,358 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

class Main{

    static void solve(){

        int t = ni();
        while(t-->0) {
            int n = ni();
            int ans = 0;
            for(int i = 0 ; i < n ; i ++ ) {
                if(ni() == 1) ans++;
            }
            output.println(ans);
        }

    }

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - //

    static int ni(){ return Integer.parseInt(sc.next()); }
    static long nl(){ return Long.parseLong(sc.next()); }
    static double nd(){ return Double.parseDouble(sc.next()); }
    static String ns(){ return sc.next(); }
    static BigInteger bi(){ return sc.nextBigInteger(); }
    static BigDecimal bd(){ return sc.nextBigDecimal(); }

    static PrintWriter output;
    static Scanner sc ;
    public static void main(String[] args){
        output = new PrintWriter(System.out);
        sc = new Scanner(System.in);
        solve();
        output.flush();
    }

}

0