結果

問題 No.3295 Buying Bottled Water
コンテスト
ユーザー Mostafa osman
提出日時 2025-11-14 03:13:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 1,784 ms
コンパイル使用メモリ 194,364 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-11-14 03:13:29
合計ジャッジ時間 3,576 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define MOSTAFAOSMAN() ios_base::sync_with_stdio(false);cout.tie(NULL),cin.tie(NULL);
#define ll long long
#define ld long double
#define outCondtion(a) cout<<((a)?"YES":"NO")<<"\n";
#define tloop int t;cin>>t;cin.ignore();while(t--)
#define endl "\n"
#define inf 0x3f3f3f3f3f3f3f3fLL
#define debug(x) cout<<"debug "<<(#x)<<": "<<x<<endl<<flush;
#define int long long
using namespace std;

void solve() {
    int n;
    cin >> n;
    int ans = n / 500;
    n %= 500;
    if (n >= 100) {
        ++ans;
    }
    cout << ans << endl;
}

signed main() {
    MOSTAFAOSMAN()
    solve();

    return 0;
}
0