結果

問題 No.88 次はどっちだ
ユーザー 綾地寧々綾地寧々
提出日時 2015-06-15 13:11:57
言語 PHP
(8.3.4)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 310 bytes
コンパイル時間 645 ms
コンパイル使用メモリ 18,408 KB
実行使用メモリ 18,992 KB
最終ジャッジ日時 2023-09-21 02:08:45
合計ジャッジ時間 1,744 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,924 KB
testcase_01 AC 17 ms
18,860 KB
testcase_02 AC 16 ms
18,876 KB
testcase_03 AC 16 ms
18,868 KB
testcase_04 AC 16 ms
18,880 KB
testcase_05 AC 16 ms
18,988 KB
testcase_06 AC 16 ms
18,992 KB
testcase_07 AC 16 ms
18,864 KB
testcase_08 AC 16 ms
18,844 KB
testcase_09 AC 16 ms
18,872 KB
testcase_10 AC 16 ms
18,872 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
define("FIELD_SIZE", 8*8);
$name = array("oda", "yukiko");
$first_player = array_search(trim(fgets(STDIN)), $name);
$dot_count = 0;
for ($i=0; $i<8; $i++) {
	$count = count_chars(trim(fgets(STDIN)), 1);
	$dot_count += $count[ord('.')];
}
echo $name[(FIELD_SIZE-4-$dot_count+$first_player) % 2] .PHP_EOL;
0