結果
| 問題 |
No.1791 Repeat Multiplication
|
| コンテスト | |
| ユーザー |
taiga0629kyopro
|
| 提出日時 | 2022-08-09 08:58:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 510 ms / 3,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 610 ms |
| コンパイル使用メモリ | 82,040 KB |
| 実行使用メモリ | 88,160 KB |
| 最終ジャッジ日時 | 2024-09-19 16:10:55 |
| 合計ジャッジ時間 | 14,088 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
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)
taiga0629kyopro