結果

問題 No.1791 Repeat Multiplication
ユーザー taiga0629kyoprotaiga0629kyopro
提出日時 2022-08-09 08:58:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 522 ms / 3,000 ms
コード長 273 bytes
コンパイル時間 940 ms
コンパイル使用メモリ 81,400 KB
実行使用メモリ 87,644 KB
最終ジャッジ日時 2023-10-19 20:02:50
合計ジャッジ時間 15,137 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,272 KB
testcase_01 AC 37 ms
53,272 KB
testcase_02 AC 45 ms
59,772 KB
testcase_03 AC 38 ms
53,364 KB
testcase_04 AC 49 ms
61,664 KB
testcase_05 AC 63 ms
66,644 KB
testcase_06 AC 39 ms
53,376 KB
testcase_07 AC 49 ms
61,676 KB
testcase_08 AC 301 ms
77,040 KB
testcase_09 AC 277 ms
77,020 KB
testcase_10 AC 272 ms
76,940 KB
testcase_11 AC 263 ms
76,892 KB
testcase_12 AC 184 ms
76,248 KB
testcase_13 AC 469 ms
86,740 KB
testcase_14 AC 478 ms
86,992 KB
testcase_15 AC 415 ms
84,000 KB
testcase_16 AC 406 ms
83,712 KB
testcase_17 AC 473 ms
87,344 KB
testcase_18 AC 429 ms
85,356 KB
testcase_19 AC 455 ms
86,592 KB
testcase_20 AC 414 ms
84,272 KB
testcase_21 AC 444 ms
86,364 KB
testcase_22 AC 503 ms
87,396 KB
testcase_23 AC 426 ms
84,468 KB
testcase_24 AC 463 ms
86,912 KB
testcase_25 AC 454 ms
85,968 KB
testcase_26 AC 522 ms
87,028 KB
testcase_27 AC 427 ms
85,320 KB
testcase_28 AC 490 ms
87,540 KB
testcase_29 AC 494 ms
87,536 KB
testcase_30 AC 473 ms
87,640 KB
testcase_31 AC 38 ms
53,376 KB
testcase_32 AC 479 ms
87,544 KB
testcase_33 AC 497 ms
87,544 KB
testcase_34 AC 510 ms
87,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #



n,q=map(int,input().split())
dp=[0]*(n+1)
dp[1]=1
for i in range(1,n):
    for k in range(2,10**9):
        if i*k>n:break
        dp[i*k]+=dp[i]
for iii in range(q):
    x=int(input())
    ans=0
    for y in range(x,n+1,x):
        ans+=dp[x]*dp[y//x]
    print(ans)


0