結果

問題 No.69 文字を自由に並び替え
ユーザー tentententen
提出日時 2020-11-10 15:02:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 447 bytes
コンパイル時間 4,765 ms
コンパイル使用メモリ 71,392 KB
実行使用メモリ 56,408 KB
最終ジャッジ日時 2023-09-29 23:36:51
合計ジャッジ時間 6,370 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
56,408 KB
testcase_01 AC 114 ms
56,372 KB
testcase_02 AC 116 ms
56,392 KB
testcase_03 AC 116 ms
55,724 KB
testcase_04 AC 117 ms
55,928 KB
testcase_05 AC 116 ms
56,004 KB
testcase_06 AC 116 ms
55,928 KB
testcase_07 AC 115 ms
55,840 KB
testcase_08 AC 116 ms
56,132 KB
testcase_09 AC 116 ms
55,704 KB
testcase_10 AC 116 ms
56,008 KB
testcase_11 AC 115 ms
53,648 KB
testcase_12 AC 115 ms
55,880 KB
testcase_13 AC 115 ms
55,412 KB
testcase_14 AC 115 ms
55,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] aArr = sc.next().toCharArray();
        Arrays.sort(aArr);
        char[] bArr = sc.next().toCharArray();
        Arrays.sort(bArr);
        if (new String(aArr).equals(new String(bArr))) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }
}
0