結果

問題 No.88 次はどっちだ
ユーザー 3846masa3846masa
提出日時 2015-03-16 04:33:31
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 4,700 KB
最終ジャッジ日時 2023-09-11 08:28:28
合計ジャッジ時間 759 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,576 KB
testcase_01 AC 2 ms
4,592 KB
testcase_02 AC 2 ms
4,496 KB
testcase_03 AC 3 ms
4,512 KB
testcase_04 WA -
testcase_05 AC 2 ms
4,680 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 3 ms
4,504 KB
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

chomp(my $black = <STDIN>);
my $white = ($black eq 'oda') ? 'yukiko' : 'oda';
my ($b_num, $w_num) = (0, 0);
while (chomp($_ = <STDIN>)) {
    my @array = split('', $_);
    my @b_arr = grep {$_ eq 'b'} @array;
    my @w_arr = grep {$_ eq 'w'} @array;
    $b_num += scalar(@b_arr);
    $w_num += scalar(@w_arr);
}
print(($b_num > $w_num) ? $white : $black);
print "\n";
0