結果

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

テストケース

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

ソースコード

diff #

chomp(my $black = <STDIN>);
my $white = ($black eq 'oda') ? 'yukiko' : 'oda';
my $total = 0;
foreach (1..8) {
    chomp($_ = <STDIN>);
    my @array = split('', $_);
    $total += scalar(grep {$_ eq 'b' || $_ eq 'w'} @array);
}
print(($total%2 == 0) ? $black : $white);
print "\n";
0