結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 215 ms
44,648 KB
testcase_01 AC 134 ms
29,612 KB
testcase_02 AC 134 ms
29,592 KB
testcase_03 AC 134 ms
29,600 KB
testcase_04 AC 133 ms
29,580 KB
testcase_05 AC 136 ms
29,612 KB
testcase_06 AC 133 ms
29,512 KB
testcase_07 AC 133 ms
29,636 KB
testcase_08 AC 134 ms
29,624 KB
testcase_09 AC 136 ms
29,620 KB
testcase_10 AC 130 ms
29,452 KB
testcase_11 AC 138 ms
30,872 KB
testcase_12 AC 145 ms
31,568 KB
testcase_13 AC 142 ms
30,756 KB
testcase_14 AC 135 ms
29,648 KB
testcase_15 AC 145 ms
30,860 KB
testcase_16 AC 220 ms
45,636 KB
testcase_17 AC 207 ms
43,904 KB
testcase_18 AC 141 ms
30,572 KB
testcase_19 AC 150 ms
32,272 KB
testcase_20 AC 175 ms
38,340 KB
testcase_21 AC 141 ms
30,112 KB
testcase_22 AC 166 ms
36,916 KB
testcase_23 AC 213 ms
45,436 KB
testcase_24 AC 143 ms
30,332 KB
testcase_25 AC 161 ms
34,612 KB
testcase_26 AC 133 ms
29,816 KB
testcase_27 AC 135 ms
29,992 KB
testcase_28 AC 142 ms
30,884 KB
testcase_29 AC 137 ms
30,012 KB
testcase_30 AC 134 ms
29,960 KB
testcase_31 AC 146 ms
30,828 KB
testcase_32 AC 144 ms
31,128 KB
testcase_33 AC 136 ms
29,860 KB
testcase_34 AC 142 ms
30,728 KB
testcase_35 AC 143 ms
30,952 KB
testcase_36 AC 178 ms
39,020 KB
testcase_37 AC 177 ms
38,368 KB
testcase_38 AC 193 ms
42,164 KB
testcase_39 AC 186 ms
40,212 KB
testcase_40 AC 237 ms
50,260 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