結果

問題 No.69 文字を自由に並び替え
ユーザー len_proglen_prog
提出日時 2016-06-08 11:49:38
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 2,327 ms
コンパイル使用メモリ 72,228 KB
実行使用メモリ 56,356 KB
最終ジャッジ日時 2023-09-09 21:01:33
合計ジャッジ時間 4,640 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,780 KB
testcase_01 AC 114 ms
55,704 KB
testcase_02 AC 114 ms
55,900 KB
testcase_03 AC 114 ms
56,236 KB
testcase_04 WA -
testcase_05 AC 112 ms
55,596 KB
testcase_06 AC 113 ms
56,356 KB
testcase_07 AC 113 ms
55,552 KB
testcase_08 AC 112 ms
55,320 KB
testcase_09 AC 114 ms
55,968 KB
testcase_10 AC 113 ms
55,700 KB
testcase_11 AC 112 ms
56,104 KB
testcase_12 AC 112 ms
56,348 KB
testcase_13 AC 113 ms
55,372 KB
testcase_14 AC 113 ms
56,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		char[] A = scan.next().toCharArray();
		char[] B = scan.next().toCharArray();

		int count = 0;
		for(int i = 0; i < A.length; i++){
			for(int j = 0; j < B.length; j++){
				if(A[i] == B[j]){
					count++;
					break;
				}
			}
		}

		String result;
		result = count == A.length ? "YES":"NO";
		System.out.println(result);
		scan.close();
	}

}
0