結果

問題 No.69 文字を自由に並び替え
ユーザー springspring
提出日時 2019-06-13 10:21:42
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 1,933 ms
コンパイル使用メモリ 71,820 KB
実行使用メモリ 56,644 KB
最終ジャッジ日時 2023-08-21 00:19:35
合計ジャッジ時間 4,427 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,696 KB
testcase_01 AC 115 ms
55,388 KB
testcase_02 AC 116 ms
56,180 KB
testcase_03 AC 111 ms
56,224 KB
testcase_04 AC 112 ms
55,912 KB
testcase_05 AC 113 ms
56,168 KB
testcase_06 AC 112 ms
55,692 KB
testcase_07 AC 112 ms
56,644 KB
testcase_08 AC 113 ms
56,440 KB
testcase_09 AC 114 ms
55,696 KB
testcase_10 AC 115 ms
56,204 KB
testcase_11 AC 115 ms
55,960 KB
testcase_12 AC 114 ms
55,740 KB
testcase_13 AC 113 ms
55,404 KB
testcase_14 AC 115 ms
55,800 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 A = sc.next();
		String B = sc.next();
		sc.close();
		char[] chA = A.toCharArray();
		char[] chB = B.toCharArray();
		Arrays.sort(chA);
		Arrays.sort(chB);
		if(Arrays.equals(chA, chB)){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
 	}// mainmethod

} // class
0