結果

問題 No.3295 Buying Bottled Water
ユーザー おのせ
提出日時 2025-09-25 20:58:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 752 bytes
コンパイル時間 4,834 ms
コンパイル使用メモリ 253,228 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-09-25 20:58:16
合計ジャッジ時間 5,847 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
#include <iostream>
#include <cmath>
using namespace std;
using namespace atcoder;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
using WGraph = vector<vector<pair<ll, ll>>>;
using mint = modint998244353;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
mt19937_64 rng(58);
long double PI = 3.14159265358979;
const ll LLMAX = 9223372036854775807;
const ll INF = 1e18;
vector<ll> di = {1, 0, -1, 0};
vector<ll> dj = {0, -1, 0, 1};
void chmin(ll& x, ll y) { x = min(x, y);};
void chmax(ll& x, ll y) { x = max(x, y);};

int main() {
    ll n;
    cin >> n;

    ll ans = n / 500;
    ll rest = n % 500;
    if (rest >= 100) ans++;

    cout << ans << endl;
    return 0;
}
0