結果

問題 No.836 じょうよ
ユーザー maspymaspy
提出日時 2020-01-16 13:13:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 222 ms / 1,000 ms
コード長 377 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 50,180 KB
最終ジャッジ日時 2023-09-05 20:40:20
合計ジャッジ時間 8,464 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 204 ms
44,676 KB
testcase_01 AC 128 ms
29,604 KB
testcase_02 AC 131 ms
29,456 KB
testcase_03 AC 128 ms
29,620 KB
testcase_04 AC 128 ms
29,584 KB
testcase_05 AC 131 ms
29,596 KB
testcase_06 AC 129 ms
29,560 KB
testcase_07 AC 129 ms
29,620 KB
testcase_08 AC 132 ms
29,684 KB
testcase_09 AC 128 ms
29,636 KB
testcase_10 AC 128 ms
29,688 KB
testcase_11 AC 134 ms
30,852 KB
testcase_12 AC 138 ms
31,492 KB
testcase_13 AC 133 ms
30,936 KB
testcase_14 AC 129 ms
29,844 KB
testcase_15 AC 135 ms
31,152 KB
testcase_16 AC 204 ms
45,496 KB
testcase_17 AC 204 ms
44,020 KB
testcase_18 AC 133 ms
30,456 KB
testcase_19 AC 143 ms
32,252 KB
testcase_20 AC 172 ms
38,524 KB
testcase_21 AC 131 ms
30,060 KB
testcase_22 AC 162 ms
37,116 KB
testcase_23 AC 203 ms
45,568 KB
testcase_24 AC 134 ms
30,608 KB
testcase_25 AC 156 ms
34,812 KB
testcase_26 AC 130 ms
29,828 KB
testcase_27 AC 130 ms
30,008 KB
testcase_28 AC 135 ms
30,900 KB
testcase_29 AC 131 ms
30,236 KB
testcase_30 AC 130 ms
29,816 KB
testcase_31 AC 136 ms
30,936 KB
testcase_32 AC 135 ms
31,060 KB
testcase_33 AC 129 ms
30,028 KB
testcase_34 AC 134 ms
30,860 KB
testcase_35 AC 135 ms
31,136 KB
testcase_36 AC 171 ms
39,048 KB
testcase_37 AC 168 ms
38,104 KB
testcase_38 AC 185 ms
42,328 KB
testcase_39 AC 178 ms
40,004 KB
testcase_40 AC 222 ms
50,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

L, R, N = map(int,read().split())

def f(x):
    # 0,1,2,...,x-1
    q,r = divmod(x,N)
    counter = np.zeros(N, np.int64)
    counter += q
    counter[:r] += 1
    return counter

answer = f(R+1) - f(L)
print('\n'.join(answer.astype(str)))
0