結果
問題 | No.2099 [Cherry Alpha B] Time Machine |
ユーザー |
![]() |
提出日時 | 2022-10-14 22:11:17 |
言語 | Perl (5.40.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 323 ms |
コンパイル使用メモリ | 6,940 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-26 14:51:46 |
合計ジャッジ時間 | 6,227 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 63 WA * 9 |
コンパイルメッセージ
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){$c+=$y;$t+=$b;$q=int$t/$a;$c+=$q*$x;$t-=$q*$a;if($c>$d){last;}if($d>$c+$t){$d=$c+$t;}}print$d;