結果

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

ソースコード

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(" ")).sorted().toList();
            if(strList.equals(amaouPattern)) {
                cnt++;
                System.out.println(i);
            }
        }
        System.out.println(cnt);
    }
}
0