結果

問題 No.128 お年玉(1)
コンテスト
ユーザー komakoko
提出日時 2026-05-11 00:47:09
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 1,286 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,571 ms
コンパイル使用メモリ 329,004 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-05-11 00:47:17
合計ジャッジ時間 5,483 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define rep(i, n) for(ll i = 0; i < (ll)(n); ++i)
#define rep1(i, n) for(ll i = 1; i <= (ll)(n); ++i)
#define rrep(i, n) for(ll i = (ll)(n) - 1; i >= 0; --i)
#define rrep1(i, n) for(ll i = (ll)(n); i >= 1; --i)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#ifdef DEBUG
#define dbg if(true)
#else
#define dbg if(false)
#endif
template<typename T> bool chmin(T &a, const T &b) {if(a>b) {a=b; return true;} return false;}
template<typename T> bool chmax(T &a, const T &b) {if(a<b) {a=b; return true;} return false;}
template <typename T> void print(const T &a) {cout << a << '\n';}
template <typename T> void print(const vector<T> &v1) {for(int i=0; i<v1.size(); ++i){if(i) {cout << ' ';} cout << v1[i];} cout << '\n';}
template <typename T> void print(const vector<vector<T>> &v2) {for(int i=0; i<v2.size(); ++i) print(v2[i]); cout << '\n';}



void solve() {
  ll n, m; cin >> n >> m;
  cout << (n / 1000) / m * 1000 << endl;
  return;
}

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int test_case = 1;
  // cin >> test_case;
  // cout << std::setprecision(15);
  while (test_case--) {
    solve();
  }
  return 0;
}
0