結果

問題 No.69 文字を自由に並び替え
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-01-22 19:32:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 430 bytes
コンパイル時間 1,874 ms
コンパイル使用メモリ 71,940 KB
実行使用メモリ 56,580 KB
最終ジャッジ日時 2023-08-20 23:13:55
合計ジャッジ時間 4,487 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,748 KB
testcase_01 AC 113 ms
56,580 KB
testcase_02 AC 113 ms
54,244 KB
testcase_03 AC 116 ms
55,712 KB
testcase_04 AC 116 ms
56,156 KB
testcase_05 AC 114 ms
56,092 KB
testcase_06 AC 114 ms
56,304 KB
testcase_07 AC 114 ms
56,184 KB
testcase_08 AC 114 ms
55,772 KB
testcase_09 AC 115 ms
56,220 KB
testcase_10 AC 113 ms
56,388 KB
testcase_11 AC 115 ms
56,400 KB
testcase_12 AC 112 ms
56,292 KB
testcase_13 AC 115 ms
55,916 KB
testcase_14 AC 113 ms
55,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String A = sc.next();
		String B = sc.next();
		
		char[] charA = A.toCharArray();
		char[] charB = B.toCharArray();
		
		Arrays.sort(charA);
		Arrays.sort(charB);
		
		if(String.valueOf(charA).equals(String.valueOf(charB))) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}
0