結果

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

テストケース

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