結果
問題 |
No.836 じょうよ
|
ユーザー |
|
提出日時 | 2019-01-23 11:15:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 1,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 68,016 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-06 18:39:03 |
合計ジャッジ時間 | 1,972 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include<iostream> #include<vector> using namespace std; typedef long long ll; int main(){ ll l, r, n; scanf("%lld %lld %lld", &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++){ printf("%lld\n", ans[i]+bias); } return 0; }