結果

問題 No.1573 Divisor Function
ユーザー ayaoniayaoni
提出日時 2021-09-01 22:17:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 748 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 86,872 KB
実行使用メモリ 76,744 KB
最終ジャッジ日時 2023-08-19 02:39:44
合計ジャッジ時間 5,793 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,704 KB
testcase_01 AC 59 ms
71,632 KB
testcase_02 AC 66 ms
76,420 KB
testcase_03 AC 61 ms
71,676 KB
testcase_04 AC 61 ms
71,644 KB
testcase_05 AC 65 ms
71,604 KB
testcase_06 AC 60 ms
71,328 KB
testcase_07 WA -
testcase_08 AC 59 ms
71,568 KB
testcase_09 AC 59 ms
71,900 KB
testcase_10 AC 60 ms
71,656 KB
testcase_11 AC 59 ms
71,500 KB
testcase_12 AC 59 ms
71,848 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 59 ms
71,784 KB
testcase_17 AC 59 ms
71,804 KB
testcase_18 WA -
testcase_19 AC 66 ms
76,372 KB
testcase_20 AC 66 ms
76,448 KB
testcase_21 AC 68 ms
76,228 KB
testcase_22 WA -
testcase_23 AC 66 ms
76,140 KB
testcase_24 AC 66 ms
76,420 KB
testcase_25 WA -
testcase_26 AC 65 ms
76,136 KB
testcase_27 AC 67 ms
76,636 KB
testcase_28 AC 64 ms
76,436 KB
testcase_29 WA -
testcase_30 AC 64 ms
76,252 KB
testcase_31 WA -
testcase_32 AC 66 ms
76,416 KB
testcase_33 AC 66 ms
76,368 KB
testcase_34 WA -
testcase_35 AC 65 ms
76,136 KB
testcase_36 WA -
testcase_37 AC 68 ms
76,472 KB
testcase_38 AC 68 ms
76,500 KB
testcase_39 AC 68 ms
76,596 KB
testcase_40 AC 67 ms
76,256 KB
testcase_41 AC 66 ms
76,592 KB
testcase_42 AC 67 ms
76,136 KB
testcase_43 AC 66 ms
76,592 KB
testcase_44 AC 66 ms
76,516 KB
testcase_45 AC 66 ms
76,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


n,m = MI()
mod = 998244353

N = int(n**.5)
ans = 0
for i in range(1,min(N,m)+1):
    x = n//i
    ans += i*x*(x+3)//2
    ans %= mod

for x in range(N,0,-1):
    left = max(n//(x+1),N)+1
    right = min(m,n//x)
    if left > right:
        break
    ans += x*(x+3)//2*(left+right)*(right-left+1)//2
    ans %= mod

print(ans)
0