結果
問題 | No.2714 Amaou |
ユーザー | ks2m |
提出日時 | 2024-04-05 22:27:38 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 151 ms / 2,000 ms |
コード長 | 641 bytes |
コンパイル時間 | 1,898 ms |
コンパイル使用メモリ | 75,036 KB |
実行使用メモリ | 41,964 KB |
最終ジャッジ日時 | 2024-10-01 02:40:06 |
合計ジャッジ時間 | 6,329 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
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); } }