結果
問題 | No.2099 [Cherry Alpha B] Time Machine |
ユーザー |
![]() |
提出日時 | 2022-10-14 22:07:50 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-26 14:44:33 |
合計ジャッジ時間 | 2,209 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 WA * 28 |
コンパイルメッセージ
Warning: Use of "int" without parentheses is ambiguous at Main.pl line 5. Main.pl syntax OK
ソースコード
$t=<>; ($x,$a)=glob<>; ($y,$b)=glob<>; if($t<0){ $q=int+(1-$t)/$b+1; $c+=$q*$y; $t+=$q*$b; } { $q=int$t/$a; $c+=$q*$x; $t-=$q*$a; $d=$c+$t; } while(1){ $t+=$y; $c+=$b; $q=int$t/$a; $c+=$q*$x; $t-=$q*$a; if($c>$d){ last; } if($d>$c+$t){ $d=$c+$t; } } print$d;