結果

問題 No.69 文字を自由に並び替え
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-21 10:29:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 335 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 71,760 KB
実行使用メモリ 39,904 KB
最終ジャッジ日時 2023-08-20 23:52:00
合計ジャッジ時間 4,545 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
39,360 KB
testcase_01 AC 115 ms
39,344 KB
testcase_02 AC 110 ms
39,880 KB
testcase_03 AC 114 ms
39,716 KB
testcase_04 AC 110 ms
39,216 KB
testcase_05 AC 115 ms
39,388 KB
testcase_06 AC 115 ms
39,720 KB
testcase_07 AC 112 ms
39,904 KB
testcase_08 AC 113 ms
39,388 KB
testcase_09 AC 111 ms
39,208 KB
testcase_10 AC 111 ms
39,328 KB
testcase_11 AC 113 ms
39,328 KB
testcase_12 AC 113 ms
39,124 KB
testcase_13 AC 113 ms
39,532 KB
testcase_14 AC 114 ms
39,100 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);
		char[] s1 = sc.next().toCharArray();
		char[] s2 = sc.next().toCharArray();
		Arrays.sort(s1); Arrays.sort(s2);
		System.out.println(Arrays.equals(s1, s2) ? "YES" : "NO");
 	}
}

0