結果

問題 No.2714 Amaou
ユーザー sysnote8main
提出日時 2024-04-11 21:57:58
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 576 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 76,012 KB
実行使用メモリ 54,796 KB
最終ジャッジ日時 2024-10-02 21:42:56
合計ジャッジ時間 7,163 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    private static List<String> amaouPattern = Arrays.asList("akai", "marui", "okii", "umai");
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            List<String> strList = Arrays.stream(sc.nextLine().split(" ")).distinct().sorted().toList();
            if(strList.equals(amaouPattern)) cnt++;
        }
        System.out.println(cnt);
    }
}
0