結果
| 問題 |
No.836 じょうよ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-15 09:43:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 1,000 ms |
| コード長 | 817 bytes |
| コンパイル時間 | 1,201 ms |
| コンパイル使用メモリ | 166,316 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 13:49:49 |
| 合計ジャッジ時間 | 2,410 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include "bits/stdc++.h"
// Custom Header <<<
#define ALL(x) x.begin(), x.end()
#define rep(i, s, n) for(int i(s); i < int(n); ++i)
#ifndef YDK
#define eprintf(...)
#endif
using namespace std;
using i64 = long long;
using pii = pair<int, int>;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int MOD = int(1e9) + 7;
// >>>
signed main()
{
i64 l, r, n; cin >> l >> r >> n;
auto f = [d = n](i64 n, i64 p) {
return n/d + (p < (n % d));
};
rep(i, 0, n) {
cout << f(r+1, i) - f(l, i) << '\n';
}
return 0;
}
/* vim:set foldmethod=marker foldmarker=<<<,>>> : */