結果

問題 No.69 文字を自由に並び替え
ユーザー カニ戯(ryカニ戯(ry
提出日時 2015-02-25 15:27:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 306 bytes
コンパイル時間 2,072 ms
コンパイル使用メモリ 73,056 KB
実行使用メモリ 56,424 KB
最終ジャッジ日時 2023-08-20 22:46:26
合計ジャッジ時間 4,639 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,736 KB
testcase_01 AC 122 ms
56,148 KB
testcase_02 AC 123 ms
56,272 KB
testcase_03 AC 123 ms
55,960 KB
testcase_04 AC 122 ms
56,316 KB
testcase_05 AC 122 ms
56,284 KB
testcase_06 AC 122 ms
55,852 KB
testcase_07 AC 121 ms
55,952 KB
testcase_08 AC 122 ms
55,856 KB
testcase_09 AC 120 ms
56,172 KB
testcase_10 AC 120 ms
56,424 KB
testcase_11 AC 119 ms
55,840 KB
testcase_12 AC 119 ms
56,112 KB
testcase_13 AC 119 ms
56,044 KB
testcase_14 AC 121 ms
56,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;


public class Main {
	public static void main(String[] a) {
		Scanner s=new Scanner(System.in);
		char[] A=s.nextLine().toCharArray(),B=s.nextLine().toCharArray();
		Arrays.sort(A);Arrays.sort(B);
		System.out.println(Arrays.equals(A,B)?"YES":"NO");
	}
}
0