結果

問題 No.2714 Amaou
ユーザー ks2mks2m
提出日時 2024-04-05 22:27:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 641 bytes
コンパイル時間 2,826 ms
コンパイル使用メモリ 75,548 KB
実行使用メモリ 58,320 KB
最終ジャッジ日時 2024-04-05 22:27:46
合計ジャッジ時間 7,818 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,820 KB
testcase_01 AC 128 ms
57,956 KB
testcase_02 AC 146 ms
57,956 KB
testcase_03 AC 149 ms
58,088 KB
testcase_04 AC 145 ms
57,964 KB
testcase_05 AC 144 ms
58,092 KB
testcase_06 AC 150 ms
57,960 KB
testcase_07 AC 146 ms
57,964 KB
testcase_08 AC 153 ms
58,320 KB
testcase_09 AC 146 ms
57,896 KB
testcase_10 AC 147 ms
57,832 KB
testcase_11 AC 153 ms
57,972 KB
testcase_12 AC 150 ms
57,956 KB
testcase_13 AC 156 ms
57,820 KB
testcase_14 AC 147 ms
57,836 KB
testcase_15 AC 146 ms
57,840 KB
testcase_16 AC 140 ms
57,580 KB
testcase_17 AC 146 ms
57,840 KB
testcase_18 AC 148 ms
58,084 KB
testcase_19 AC 142 ms
57,976 KB
testcase_20 AC 180 ms
57,820 KB
testcase_21 AC 148 ms
57,948 KB
testcase_22 AC 130 ms
57,820 KB
testcase_23 AC 128 ms
57,848 KB
testcase_24 AC 148 ms
58,084 KB
testcase_25 AC 147 ms
57,976 KB
testcase_26 AC 150 ms
58,100 KB
testcase_27 AC 147 ms
57,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		List<List<String>> list = new ArrayList<>();
		for (int i = 0; i < n; i++) {
			List<String> list2 = new ArrayList<>();
			for (int j = 0; j < 4; j++) {
				list2.add(sc.next());
			}
			list.add(list2);
		}
		sc.close();

		int ans = 0;
		for (int i = 0; i < n; i++) {
			List<String> list2 = list.get(i);
			if (list2.contains("akai") && list2.contains("marui") &&
					list2.contains("okii") && list2.contains("umai")) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}
0