結果

問題 No.69 文字を自由に並び替え
ユーザー shinwisteriashinwisteria
提出日時 2017-03-18 21:27:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 4,792 ms
コンパイル使用メモリ 71,600 KB
実行使用メモリ 57,944 KB
最終ジャッジ日時 2023-09-09 21:13:10
合計ジャッジ時間 6,429 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
53,688 KB
testcase_01 AC 116 ms
57,944 KB
testcase_02 AC 115 ms
55,644 KB
testcase_03 AC 116 ms
56,120 KB
testcase_04 WA -
testcase_05 AC 116 ms
55,692 KB
testcase_06 AC 116 ms
56,108 KB
testcase_07 AC 115 ms
55,704 KB
testcase_08 AC 115 ms
55,644 KB
testcase_09 AC 114 ms
55,696 KB
testcase_10 AC 116 ms
55,748 KB
testcase_11 AC 116 ms
55,876 KB
testcase_12 AC 118 ms
55,892 KB
testcase_13 AC 116 ms
55,892 KB
testcase_14 AC 115 ms
55,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Narabikae {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		char[] A = s.nextLine().toCharArray();
		String B = s.nextLine();
		s.close();
		int n = 0;
		for(char c : A){
			if(B.indexOf(c) >= 0){
				n++;
			}
		}
		
		if(n == B.length()){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

}
0