結果

問題 No.69 文字を自由に並び替え
ユーザー len_proglen_prog
提出日時 2016-06-08 11:46:16
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 2,183 ms
コンパイル使用メモリ 71,232 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-09-09 21:00:58
合計ジャッジ時間 5,129 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,440 KB
testcase_01 AC 120 ms
55,392 KB
testcase_02 AC 122 ms
55,536 KB
testcase_03 AC 119 ms
55,404 KB
testcase_04 WA -
testcase_05 AC 121 ms
55,372 KB
testcase_06 AC 122 ms
55,300 KB
testcase_07 AC 122 ms
55,692 KB
testcase_08 AC 121 ms
56,080 KB
testcase_09 AC 121 ms
55,580 KB
testcase_10 AC 122 ms
55,636 KB
testcase_11 AC 121 ms
55,704 KB
testcase_12 AC 121 ms
55,584 KB
testcase_13 AC 122 ms
55,700 KB
testcase_14 AC 121 ms
55,568 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