結果
問題 |
No.3295 Buying Bottled Water
|
ユーザー |
![]() |
提出日時 | 2025-10-05 13:43:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 775 bytes |
コンパイル時間 | 1,588 ms |
コンパイル使用メモリ | 194,352 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-10-05 13:43:34 |
合計ジャッジ時間 | 2,415 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; #define FOR(i,a,b) for (ll i = (a); i < (b); i++) #define FFOR(i,a,b) for (ll i = (b); i >= (a); i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) FFOR(i,0,n) #define YES cout << "Yes" << endl #define NO cout << "No" << endl template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } const long long INF = 1LL<<60; const int MOD = 100000000; int main(){ int n,a=0; cin>>n; rep(i,n){ a=i*500; if(n-a<100){ cout<<i<<endl; return 0; } } cout<<0<<endl; return 0; }