結果

問題 No.69 文字を自由に並び替え
ユーザー ちよちゃんちよちゃん
提出日時 2016-05-25 15:09:12
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 586 bytes
コンパイル時間 4,304 ms
コンパイル使用メモリ 73,176 KB
実行使用メモリ 56,564 KB
最終ジャッジ日時 2023-09-09 21:00:49
合計ジャッジ時間 6,509 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
54,016 KB
testcase_01 AC 114 ms
56,564 KB
testcase_02 AC 114 ms
55,988 KB
testcase_03 AC 115 ms
56,072 KB
testcase_04 WA -
testcase_05 AC 114 ms
55,668 KB
testcase_06 AC 115 ms
55,984 KB
testcase_07 AC 115 ms
55,564 KB
testcase_08 AC 114 ms
55,756 KB
testcase_09 WA -
testcase_10 AC 115 ms
55,956 KB
testcase_11 AC 114 ms
55,920 KB
testcase_12 AC 114 ms
55,708 KB
testcase_13 AC 113 ms
55,836 KB
testcase_14 AC 114 ms
55,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Yuki69 {
	
	public static void main(String args[]) {
		
		Scanner scan = new Scanner(System.in);
		String A = scan.next();
		String B = scan.next();
		scan.close();
		String[] strArr1 = A.split("");
		String[] strArr2 = B.split("");
		int check = 0;
		
		for(int i = 0; i < strArr1.length; i++ ) {
			for(int j = 0; j < strArr2.length; j++) {
				if(strArr1[i].equals(strArr2[j])){
					check += 1;
				}
			}
		}

		if (check >= strArr1.length) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}
0