結果
問題 |
No.2259 Gas Station
|
ユーザー |
|
提出日時 | 2023-04-07 21:49:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 470 bytes |
コンパイル時間 | 3,762 ms |
コンパイル使用メモリ | 233,488 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-02 19:23:19 |
合計ジャッジ時間 | 4,521 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 19 |
ソースコード
#include <atcoder/all> #include <bits/stdc++.h> using namespace std; using namespace atcoder; using ll = long long; void fast_io() { cin.tie(nullptr); ios_base::sync_with_stdio(false); } int main(void) { fast_io(); ll l, r, c; cin >> l >> r >> c; set<ll> st; for (ll i = l; i <= min(r, l + 1000); i++) { ll k = 1000 - i * c; k = (k + 1000) % 1000; st.insert(k); } cout << *st.begin() << endl; return 0; }