結果

問題 No.69 文字を自由に並び替え
ユーザー kuramubonnkuramubonn
提出日時 2023-02-02 10:07:33
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 2,082 ms
コンパイル使用メモリ 71,480 KB
実行使用メモリ 57,584 KB
最終ジャッジ日時 2023-09-14 17:24:05
合計ジャッジ時間 4,893 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,816 KB
testcase_01 AC 122 ms
55,688 KB
testcase_02 AC 121 ms
55,628 KB
testcase_03 AC 121 ms
55,356 KB
testcase_04 AC 122 ms
55,676 KB
testcase_05 AC 122 ms
55,740 KB
testcase_06 AC 123 ms
55,576 KB
testcase_07 AC 121 ms
55,600 KB
testcase_08 AC 121 ms
55,588 KB
testcase_09 AC 121 ms
55,404 KB
testcase_10 AC 121 ms
57,584 KB
testcase_11 AC 120 ms
55,420 KB
testcase_12 AC 121 ms
55,520 KB
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int count = 0;
		
		String str = sc.next();
		char[] array = str.toCharArray();
		for(char ch:array) {
			count += ch - 'a';
		}
		
		str = sc.next();
		char[] array2 = str.toCharArray();
		for(char ch:array2) {
			count -= ch - 'a';
		}
		
		if(count == 0) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}
0