結果

問題 No.1252 数字根D
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-17 15:44:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 7,916 KB
最終ジャッジ日時 2023-09-28 08:16:49
合計ジャッジ時間 1,431 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,788 KB
testcase_01 AC 12 ms
7,916 KB
testcase_02 AC 12 ms
7,792 KB
testcase_03 AC 19 ms
7,736 KB
testcase_04 AC 26 ms
7,796 KB
testcase_05 AC 26 ms
7,808 KB
testcase_06 AC 26 ms
7,848 KB
testcase_07 AC 26 ms
7,708 KB
testcase_08 AC 25 ms
7,708 KB
testcase_09 AC 26 ms
7,792 KB
testcase_10 AC 26 ms
7,848 KB
testcase_11 AC 25 ms
7,904 KB
testcase_12 AC 25 ms
7,788 KB
testcase_13 AC 25 ms
7,848 KB
testcase_14 AC 13 ms
7,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
def f(a,b):
 if b==-1:return 0
 x,y=divmod(b,a-1);return a*(a-1)//2*x+(1+y)*y//2
for _ in range(int(I())):d,a,b=map(int,I().split());print(f(d,b)-f(d,a-1))
0