結果

問題 No.836 じょうよ
ユーザー lloyzlloyz
提出日時 2022-04-23 00:24:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 415 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 11,104 KB
最終ジャッジ日時 2023-09-06 11:22:19
合計ジャッジ時間 4,317 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 14 ms
7,800 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 15 ms
7,868 KB
testcase_07 AC 14 ms
7,848 KB
testcase_08 AC 14 ms
7,744 KB
testcase_09 WA -
testcase_10 AC 13 ms
7,744 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 73 ms
10,768 KB
testcase_18 WA -
testcase_19 AC 25 ms
8,756 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 16 ms
8,304 KB
testcase_30 AC 15 ms
8,188 KB
testcase_31 AC 20 ms
8,480 KB
testcase_32 AC 20 ms
8,608 KB
testcase_33 AC 16 ms
8,304 KB
testcase_34 AC 20 ms
8,544 KB
testcase_35 AC 19 ms
8,492 KB
testcase_36 AC 48 ms
8,852 KB
testcase_37 AC 44 ms
8,844 KB
testcase_38 AC 60 ms
9,012 KB
testcase_39 AC 49 ms
8,944 KB
testcase_40 AC 84 ms
9,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

l, r, n = map(int, input().split())

lq, lr = divmod(l, n)
rq, rr = divmod(r, n)
ANS = [0 for _ in range(n)]
if lr > rr:
    for i in range(n):
        if i <= rr or i >= lr:
            ANS[i] = rq - lq
        else:
            ANS[i] = rq - lq - 1
else:
    for i in range(n):
        if i < rr or i > lr:
            ANS[i] = rq - lq
        else:
            ANS[i] = rq - lq + 1
for ele in ANS:
    print(ele)
0