結果

問題 No.3295 Buying Bottled Water
ユーザー ZOI-dayo
提出日時 2025-10-05 13:35:05
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,290 bytes
コンパイル時間 2,315 ms
コンパイル使用メモリ 276,924 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-05 13:36:45
合計ジャッジ時間 3,278 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using vl = vector<ll>;
template <class T> using vec = vector<T>;
template <class T> using vv = vec<vec<T>>;
template <class T> using vvv = vv<vec<T>>;
template <class T> using minpq = priority_queue<T, vec<T>, greater<T>>;
#define rep(i, r) for(ll i = 0; i < (r); i++)
#define reps(i, l, r) for(ll i = (l); i < (r); i++)
#define rrep(i, l, r) for(ll i = (r) - 1; i >= (l); i--)
#define all(a) (a).begin(), (a).end()
#define sz(a) (ll)(a).size()
template<typename T>
bool chmax(T &a, const T& b) { return a < b ? a = b, true : false; }
template <typename T>
bool chmin(T &a, const T& b) { return a > b ? a = b, true : false; }
ll modmul(ll a, ll b, ll mod) {
	ll ret = a * b - mod * ll(1.L / mod * a * b);
	return ret + mod * (ret < 0) - mod * (ret >= mod);
}
ll modpow(ll a, ll b, ll mod) {
	ll ans = 1;
	for (; b; a = modmul(a, a, mod), b /= 2)
		if (b & 1) ans = modmul(ans, a, mod);
	return ans;
}

using ull = unsigned long long;

int solve() {
    ll n;
    cin >> n;
    ll now = 0;
    while(n - now >= 100) now += 500;
    cout << now / 500 << endl;
    return 0;
}

int main() {
	ll T = 1;
	cout << fixed << setprecision(16);
	// cin >> T;
	while (T--) solve();
}
0