結果

問題 No.3295 Buying Bottled Water
ユーザー Nafmo2
提出日時 2025-08-20 15:40:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,148 bytes
コンパイル時間 3,718 ms
コンパイル使用メモリ 251,472 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-08-20 15:40:06
合計ジャッジ時間 4,904 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
typedef long long int ll;
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define REP(i,n) for(ll i=0;i<signed(n);i++)
#define EREP(i,n) for(ll i=1;i<=signed(n);i++)
#define ALL(a) (a).begin(),(a).end()
using namespace atcoder;
using namespace std;
//#define EVEL 1
#ifdef EVEL
#define DEB(X) cout << #X <<":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {}
#define TF(f) {}
#define END {}
#endif
const ll INF = 9e18;
typedef std::pair<ll, ll> P;
struct edge { ll to, cost; };
#define VMAX 100000
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; }

ll ans=0;
bool F=false;
// Nafmo template 2022.09.04
// Generated by 2.12.0 https://github.com/kyuridenamida/atcoder-tools

int main(){
  ll N;
  cin >> N;
  assert(0 <= N && N <= 1000000000);
  if( N < 100 ){
    cout << 0 << endl;
  }else if( N < 600){
    cout << 1 << endl;
  }else{
    cout << 2 + (N - 600) / 500 <<endl;
  }
  return 0;
}
0