結果
問題 | No.1592 Tenkei 90 |
ユーザー | Asahi |
提出日時 | 2023-02-06 08:06:16 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 125 ms / 1,000 ms |
コード長 | 947 bytes |
コンパイル時間 | 2,284 ms |
コンパイル使用メモリ | 75,208 KB |
実行使用メモリ | 55,640 KB |
最終ジャッジ日時 | 2023-09-17 20:13:44 |
合計ジャッジ時間 | 5,748 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 122 ms
55,460 KB |
testcase_01 | AC | 123 ms
55,604 KB |
testcase_02 | AC | 121 ms
55,604 KB |
testcase_03 | AC | 121 ms
55,436 KB |
testcase_04 | AC | 122 ms
55,556 KB |
testcase_05 | AC | 121 ms
55,628 KB |
testcase_06 | AC | 119 ms
55,332 KB |
testcase_07 | AC | 119 ms
55,588 KB |
testcase_08 | AC | 119 ms
55,520 KB |
testcase_09 | AC | 125 ms
55,448 KB |
testcase_10 | AC | 122 ms
55,456 KB |
testcase_11 | AC | 122 ms
55,468 KB |
testcase_12 | AC | 124 ms
55,300 KB |
testcase_13 | AC | 119 ms
55,488 KB |
testcase_14 | AC | 119 ms
55,276 KB |
testcase_15 | AC | 119 ms
55,432 KB |
testcase_16 | AC | 122 ms
55,124 KB |
testcase_17 | AC | 122 ms
55,448 KB |
testcase_18 | AC | 120 ms
55,312 KB |
testcase_19 | AC | 119 ms
55,640 KB |
ソースコード
import java.util.*; import java.io.*; import java.math.*; // import java.util.stream.Stream; class Main{ static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static PrintWriter output = new PrintWriter(System.out); static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws IOException{ String S = sc.next(); ArrayList<String> base = new ArrayList<>(); ArrayList<String> ans = new ArrayList<>(); String b = "kyoprotenkei90"; for(int i=0;i<S.length();i++) base.add(b.substring(i,i+1)); for(int i=0;i<S.length();i++) ans.add(S.substring(i,i+1)); Collections.sort(base); Collections.sort(ans); boolean ok = true; for(int i=0;i<S.length();i++) if(!base.get(i).equals(ans.get(i))) ok = false; output.print(ok?"Yes":"No"); output.flush(); } }