結果
| 問題 | 
                            No.836 じょうよ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             totori_nyaa
                         | 
                    
| 提出日時 | 2019-06-14 21:36:40 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 569 bytes | 
| コンパイル時間 | 1,569 ms | 
| コンパイル使用メモリ | 166,800 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-09 00:33:29 | 
| 合計ジャッジ時間 | 2,842 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 41 | 
ソースコード
#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";
    }
    for(int i=0;i<n;i++){
        if(i<=b && i<c){
            cout << a << "\n";
            return 0;
        }
        else if(i<=b){
            cout << a+1 << "\n";
        }
        else if(i<c){
            cout << a-1 << "\n";
        }
        else cout << a <<"\n";
    }
}
            
            
            
        
            
totori_nyaa