結果
| 問題 | No.1592 Tenkei 90 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-06 08:06:16 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 1,000 ms |
| コード長 | 947 bytes |
| 記録 | |
| コンパイル時間 | 1,812 ms |
| コンパイル使用メモリ | 84,164 KB |
| 実行使用メモリ | 41,784 KB |
| 最終ジャッジ日時 | 2026-03-25 22:16:38 |
| 合計ジャッジ時間 | 3,903 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
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();
}
}