結果
問題 |
No.836 じょうよ
|
ユーザー |
![]() |
提出日時 | 2019-06-14 21:40:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 740 bytes |
コンパイル時間 | 1,558 ms |
コンパイル使用メモリ | 157,396 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-09 00:40:01 |
合計ジャッジ時間 | 2,939 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 WA * 9 |
ソースコード
#include "bits/stdc++.h" using namespace std; using ll = long long; int INF = numeric_limits<int>::max() / 2; ll LINF = numeric_limits<ll>::max() / 2; int MOD = 1e9 + 7; int main(){ cin.tie(0); ios::sync_with_stdio(false); ll l, r, n; cin >> l >> r >> n; int ln = l % n, rn = r % n; ll base = (r - l + 1 - (n - ln) - rn) / n; if(l == r){ for(int i = 0; i < n; i++){ if(l % n == i){ cout << 1 << '\n'; }else{ cout << 0 << '\n'; } } }else{ for(int i = 0; i < n; i++){ ll temp = base; if(i <= rn) temp++; if(i >= ln) temp++; cout << temp << '\n'; } } }