結果

問題 No.1592 Tenkei 90
ユーザー kinkincindykinkincindy
提出日時 2021-07-09 21:52:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 622 bytes
コンパイル時間 2,566 ms
コンパイル使用メモリ 72,260 KB
実行使用メモリ 56,536 KB
最終ジャッジ日時 2023-09-14 08:45:59
合計ジャッジ時間 5,959 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,676 KB
testcase_01 AC 121 ms
55,432 KB
testcase_02 AC 120 ms
55,844 KB
testcase_03 AC 120 ms
55,896 KB
testcase_04 AC 124 ms
55,440 KB
testcase_05 AC 122 ms
55,592 KB
testcase_06 AC 120 ms
55,788 KB
testcase_07 AC 122 ms
55,672 KB
testcase_08 AC 118 ms
55,508 KB
testcase_09 AC 118 ms
56,060 KB
testcase_10 AC 119 ms
55,516 KB
testcase_11 AC 119 ms
55,756 KB
testcase_12 AC 120 ms
55,688 KB
testcase_13 AC 119 ms
55,724 KB
testcase_14 AC 119 ms
55,644 KB
testcase_15 AC 125 ms
55,788 KB
testcase_16 AC 120 ms
56,084 KB
testcase_17 AC 123 ms
55,896 KB
testcase_18 AC 119 ms
55,436 KB
testcase_19 AC 120 ms
56,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.lang.reflect.Array;
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] c = sc.next().toCharArray();
        Arrays.sort(c);
        char[] input = "kyoprotenkei90".toCharArray();
        Arrays.sort(input);

        if (input.length != c.length){
            System.out.print("No");
            return;
        }

        for (int i = 0; i < c.length; i++){
            if (c[i] != input[i]){
                System.out.print("No");
                return;
            }
        }
        System.out.print("Yes");

    }
}
0