結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
6,144 KB
testcase_01 AC 13 ms
6,200 KB
testcase_02 AC 14 ms
6,328 KB
testcase_03 AC 13 ms
6,084 KB
testcase_04 WA -
testcase_05 AC 14 ms
6,140 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 13 ms
6,216 KB
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use Data::Dumper;

chomp(my $black = <STDIN>);
my $white = ($black eq 'oda') ? 'yukiko' : 'oda';
my ($b_num, $w_num) = (0, 0);
foreach (1..8) {
    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