結果

問題 No.1592 Tenkei 90
ユーザー lavoxlavox
提出日時 2021-07-09 21:24:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 1,000 ms
コード長 476 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 72,004 KB
実行使用メモリ 56,104 KB
最終ジャッジ日時 2023-09-14 07:34:41
合計ジャッジ時間 5,603 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,420 KB
testcase_01 AC 118 ms
55,792 KB
testcase_02 AC 117 ms
55,852 KB
testcase_03 AC 122 ms
55,820 KB
testcase_04 AC 118 ms
55,964 KB
testcase_05 AC 120 ms
55,536 KB
testcase_06 AC 119 ms
55,880 KB
testcase_07 AC 118 ms
55,848 KB
testcase_08 AC 117 ms
55,772 KB
testcase_09 AC 120 ms
55,864 KB
testcase_10 AC 118 ms
55,864 KB
testcase_11 AC 119 ms
55,856 KB
testcase_12 AC 119 ms
56,104 KB
testcase_13 AC 118 ms
53,732 KB
testcase_14 AC 117 ms
55,596 KB
testcase_15 AC 118 ms
55,876 KB
testcase_16 AC 120 ms
55,560 KB
testcase_17 AC 121 ms
55,736 KB
testcase_18 AC 120 ms
55,752 KB
testcase_19 AC 121 ms
55,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		sc.close();
		
		char[] kyo = "kyoprotenkei90".toCharArray();
		Arrays.sort(kyo);
		
		char[] cc = S.toCharArray();
		Arrays.sort(cc);
		
		for ( int i = 0 ; i < kyo.length ; i++ ) {
			if ( kyo[i] != cc[i] ) {
				System.out.println("No");
				return;
			}
		}

		System.out.println("Yes");
	}
}
0