結果
問題 |
No.836 じょうよ
|
ユーザー |
![]() |
提出日時 | 2019-06-14 21:37:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 578 bytes |
コンパイル時間 | 1,532 ms |
コンパイル使用メモリ | 166,952 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-09 00:36:02 |
合計ジャッジ時間 | 2,988 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 40 WA * 1 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); ll l,r,n; cin>>l>>r>>n; vector<ll> v; ll a = r/n - (l-1)/n; ll b = r%n; ll c = l%n; if(n==1){ cout << a <<"\n"; return 0; } for(int i=0;i<n;i++){ if(i<=b && i<c){ cout << a << "\n"; } else if(i<=b){ cout << a+1 << "\n"; } else if(i<c){ cout << a-1 << "\n"; } else cout << a <<"\n"; } }