結果
| 問題 | No.415 ぴょん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-05 12:25:18 |
| 言語 | PHP (8.5.4) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 306 bytes |
| 記録 | |
| コンパイル時間 | 463 ms |
| コンパイル使用メモリ | 36,524 KB |
| 実行使用メモリ | 361,196 KB |
| 最終ジャッジ日時 | 2026-05-10 20:00:55 |
| 合計ジャッジ時間 | 3,314 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 RE * 3 TLE * 1 -- * 20 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
list($ringCnt, $step) = explode(" ", trim(fgets(STDIN)));
$ring = array_fill(0, $ringCnt, 1);
$action = 0;
$cur = 0;
$ring[$cur] = 0;
$next = ($cur+$step)%$ringCnt;
while($ring[$next]) {
$ring[$cur] = 0;
$cur = $next;
$next = ($cur+$step)%$ringCnt;
$action++;
}
echo $action.PHP_EOL;