結果
問題 | No.2259 Gas Station |
ユーザー | siman |
提出日時 | 2023-04-07 21:44:15 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 87 ms / 2,000 ms |
コード長 | 164 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-10-02 19:17:00 |
合計ジャッジ時間 | 3,073 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
コンパイルメッセージ
Main.rb:2: warning: assigned but unused variable - memo Syntax OK
ソースコード
L, R, C = gets.split.map(&:to_i) memo = Hash.new(false) x_list = (L..[L + 999, R].min) puts x_list.map { |x| (x * C) % 1000 == 0 ? 0 : 1000 - (x * C % 1000) }.min