結果
問題 | No.257 N言っちゃダメゲーム (3) |
ユーザー |
![]() |
提出日時 | 2017-03-28 10:33:32 |
言語 | Perl (5.40.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 216 bytes |
コンパイル時間 | 41 ms |
コンパイル使用メモリ | 6,684 KB |
実行使用メモリ | 43,168 KB |
最終ジャッジ日時 | 2024-07-17 00:51:28 |
合計ジャッジ時間 | 6,464 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 29 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; my($n, $k) = split ' ', <>; my $ans = ($n-1) % ($k+1); print $ans."\n"; my $opp; while(1){ $opp = <>; last if($n <= $opp); $ans = $opp + ($k+1 - ($opp - $ans)); print $ans."\n"; }