結果
| 問題 | No.1592 Tenkei 90 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-06 08:06:16 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 1,000 ms |
| コード長 | 947 bytes |
| 記録 | |
| コンパイル時間 | 2,048 ms |
| コンパイル使用メモリ | 79,744 KB |
| 実行使用メモリ | 54,276 KB |
| 最終ジャッジ日時 | 2024-07-04 14:26:10 |
| 合計ジャッジ時間 | 5,310 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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();
}
}