結果

問題 No.836 じょうよ
ユーザー mkclassmkclass
提出日時 2019-06-15 00:17:12
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 509 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 68,172 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-27 14:30:39
合計ジャッジ時間 4,290 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 2 ms
6,944 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
6,944 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 10 ms
6,940 KB
testcase_12 AC 15 ms
6,944 KB
testcase_13 AC 10 ms
6,944 KB
testcase_14 AC 4 ms
6,944 KB
testcase_15 AC 13 ms
6,940 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 5 ms
6,940 KB
testcase_22 AC 45 ms
6,940 KB
testcase_23 AC 100 ms
6,940 KB
testcase_24 WA -
testcase_25 AC 39 ms
6,940 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 12 ms
6,940 KB
testcase_32 AC 12 ms
6,940 KB
testcase_33 AC 4 ms
6,940 KB
testcase_34 AC 10 ms
6,944 KB
testcase_35 AC 12 ms
6,944 KB
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 AC 69 ms
6,944 KB
testcase_40 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <iostream>

using namespace std;

int main()
{
    int l,r,n;
    cin >> l >> r >> n;

    int remainder1 = l % n;
    int remainder2 = r % n;
    int baseCount = (r - (n - remainder2) - l - (n - remainder1)) / n;

    for(int i = 0; i < n; i++)
    {
        int temp = 0;
        if(remainder1 <= i)
        {
            temp++;
        }
        if(remainder2 >= i)
        {
            temp++;
        }
        cout << (baseCount + temp) << endl;;
    }
    
    return 0;
}
0