結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,540 KB
testcase_01 AC 3 ms
4,684 KB
testcase_02 AC 2 ms
4,528 KB
testcase_03 AC 3 ms
4,684 KB
testcase_04 WA -
testcase_05 AC 2 ms
4,500 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 3 ms
4,712 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('', $_);
    $b_num += scalar((grep {$_ eq 'b'} @array));
    $w_num += scalar((grep {$_ eq 'w'} @array));
}
print(($b_num > $w_num) ? $white : $black);
print "\n";
0