結果
問題 |
No.415 ぴょん
|
ユーザー |
|
提出日時 | 2016-09-05 12:25:18 |
言語 | PHP (843.2) |
結果 |
RE
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 3,381 ms |
コンパイル使用メモリ | 32,148 KB |
実行使用メモリ | 819,644 KB |
最終ジャッジ日時 | 2024-11-15 20:24:34 |
合計ジャッジ時間 | 11,017 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 RE * 9 TLE * 3 |
コンパイルメッセージ
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;