結果

問題 No.69 文字を自由に並び替え
ユーザー shiCanoko_oshiCanoko_o
提出日時 2019-07-14 01:47:05
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 45 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 5,504 KB
最終ジャッジ日時 2024-05-02 22:17:12
合計ジャッジ時間 821 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
5,376 KB
testcase_01 AC 3 ms
5,376 KB
testcase_02 AC 3 ms
5,504 KB
testcase_03 AC 4 ms
5,376 KB
testcase_04 WA -
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 4 ms
5,376 KB
testcase_07 AC 3 ms
5,376 KB
testcase_08 AC 3 ms
5,376 KB
testcase_09 AC 4 ms
5,504 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 3 ms
5,376 KB
testcase_12 AC 3 ms
5,376 KB
testcase_13 AC 4 ms
5,376 KB
testcase_14 AC 4 ms
5,376 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