結果

問題 No.69 文字を自由に並び替え
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-07-14 01:47:05
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 41 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 4,792 KB
最終ジャッジ日時 2023-08-15 10:45:20
合計ジャッジ時間 944 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,696 KB
testcase_01 AC 3 ms
4,708 KB
testcase_02 AC 3 ms
4,728 KB
testcase_03 AC 3 ms
4,792 KB
testcase_04 WA -
testcase_05 AC 3 ms
4,636 KB
testcase_06 AC 2 ms
4,724 KB
testcase_07 AC 2 ms
4,576 KB
testcase_08 AC 2 ms
4,508 KB
testcase_09 AC 2 ms
4,768 KB
testcase_10 AC 2 ms
4,572 KB
testcase_11 AC 2 ms
4,636 KB
testcase_12 AC 3 ms
4,480 KB
testcase_13 AC 2 ms
4,500 KB
testcase_14 AC 2 ms
4,524 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

my $letter_A = <>;
my $letter_B =<>;
chomp ($letter_A, $letter_B);

my @letter_A = split(//, $letter_A);
my $count_A = 0;
my $count_same = 0;

for my $character(@letter_A){
    $count_A++;
    if ($letter_B =~ /$character/){
        $count_same++
    }
}

if($count_A == $count_same){
    print "YES\n";
}else{
    print "NO\n";
}
0