結果
| 問題 |
No.88 次はどっちだ
|
| コンテスト | |
| ユーザー |
c
|
| 提出日時 | 2015-12-10 12:06:53 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 5,000 ms |
| コード長 | 493 bytes |
| コンパイル時間 | 1,923 ms |
| コンパイル使用メモリ | 30,544 KB |
| 実行使用メモリ | 31,588 KB |
| 最終ジャッジ日時 | 2024-09-15 07:28:05 |
| 合計ジャッジ時間 | 1,142 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
fscanf(STDIN, "%s", $first_player);
for($i=0; $i<8; $i++){
$b[] = fscanf(STDIN, "%s");
}
$players = array('oda'=>'oda','yukiko'=>'yukiko');
$total = 0;
$black_total = 0;
$white_total = 0;
foreach($b as $val){
$black_total += substr_count($val[0],'b');
$white_total += substr_count($val[0],'w');
}
$total = ($black_total + $white_total);
if($total%2 === 0){
echo $first_player;
}else{
unset($players[$first_player]);
echo array_shift($players);
}
echo "\n";
?>
c