結果

問題 No.836 じょうよ
ユーザー rpy3cpp
提出日時 2019-09-03 21:34:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 9 ms / 1,000 ms
コード長 372 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 165,064 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 17:54:05
合計ジャッジ時間 3,786 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

long long f(long long r, long long n, long long i){
    return r / n + (((r % n) >= i)? 1LL : 0LL);
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    long long l, r, n;
    cin >> l >> r >> n;
    for (long long i = 0; i < n; ++i){
        cout << f(r, n, i) - f(l - 1LL, n, i) << '\n';
    }
    return 0;
}
0