結果
問題 | No.836 じょうよ |
ユーザー |
|
提出日時 | 2024-03-28 13:15:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 122 ms / 1,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 4,341 ms |
コンパイル使用メモリ | 251,624 KB |
最終ジャッジ日時 | 2025-02-20 14:13:34 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int main() { ll l, r, n; cin >> l >> r >> n; vector<int> ans(n, 0); while (l % n != 0 && l <= r) { ans[l % n]++; l++; } ll bias = (r - l) / n; l += bias * n; while (l <= r) { ans[l % n]++; l++; } for (int i = 0; i < n; i++) { cout << ans[i] + bias << endl; } return 0; }