結果
| 問題 |
No.1731 Product of Subsequence
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-07-10 23:13:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 82,788 KB |
| 実行使用メモリ | 88,716 KB |
| 最終ジャッジ日時 | 2024-11-06 11:45:01 |
| 合計ジャッジ時間 | 13,221 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 27 |
ソースコード
n,k=map(int,input().split())
a=list(map(int,input().split()))
import math
from collections import defaultdict
d=defaultdict(int)
d[1]=1
for i in a:
d2=d.copy()
for j in d2:
d[math.gcd(k,i*j)]+=d2[j]
print(d[k])
とりゐ