結果

問題 No.1791 Repeat Multiplication
ユーザー ramdosramdos
提出日時 2021-11-27 23:40:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 465 ms / 3,000 ms
コード長 229 bytes
コンパイル時間 874 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 89,220 KB
最終ジャッジ日時 2023-10-13 19:07:01
合計ジャッジ時間 14,295 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,376 KB
testcase_01 AC 70 ms
71,236 KB
testcase_02 AC 76 ms
75,696 KB
testcase_03 AC 71 ms
71,472 KB
testcase_04 AC 81 ms
75,916 KB
testcase_05 AC 118 ms
77,372 KB
testcase_06 AC 74 ms
71,148 KB
testcase_07 AC 83 ms
75,800 KB
testcase_08 AC 307 ms
78,508 KB
testcase_09 AC 277 ms
78,056 KB
testcase_10 AC 279 ms
78,116 KB
testcase_11 AC 261 ms
78,080 KB
testcase_12 AC 201 ms
78,052 KB
testcase_13 AC 443 ms
88,176 KB
testcase_14 AC 460 ms
88,792 KB
testcase_15 AC 392 ms
85,344 KB
testcase_16 AC 380 ms
85,232 KB
testcase_17 AC 451 ms
88,832 KB
testcase_18 AC 398 ms
86,548 KB
testcase_19 AC 452 ms
88,312 KB
testcase_20 AC 391 ms
85,836 KB
testcase_21 AC 425 ms
87,768 KB
testcase_22 AC 437 ms
88,772 KB
testcase_23 AC 395 ms
85,940 KB
testcase_24 AC 465 ms
88,408 KB
testcase_25 AC 426 ms
87,536 KB
testcase_26 AC 448 ms
88,540 KB
testcase_27 AC 407 ms
86,548 KB
testcase_28 AC 457 ms
89,100 KB
testcase_29 AC 437 ms
89,220 KB
testcase_30 AC 464 ms
89,124 KB
testcase_31 AC 71 ms
71,504 KB
testcase_32 AC 444 ms
89,108 KB
testcase_33 AC 439 ms
89,008 KB
testcase_34 AC 443 ms
89,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,Q = map(int,input().split())
v=[0 for _ in range(N+1)]
v[1]=1;
for i in range(1,N+1):
  c=i*2
  while c<=N:
    v[c]+=v[i]
    c+=i
for i in range(Q):
  t=int(input())
  f=0
  for j in range(N//t):
    f+=v[j+1]
  print(v[t]*f)
0