結果
問題 | No.1250 汝は倍数なりや? |
ユーザー | brthyyjp |
提出日時 | 2020-10-09 21:30:20 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 792 bytes |
コンパイル時間 | 326 ms |
コンパイル使用メモリ | 87,028 KB |
実行使用メモリ | 81,084 KB |
最終ジャッジ日時 | 2023-09-27 14:46:24 |
合計ジャッジ時間 | 5,686 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 93 ms
71,528 KB |
testcase_01 | AC | 89 ms
71,832 KB |
testcase_02 | AC | 89 ms
71,708 KB |
testcase_03 | AC | 90 ms
71,528 KB |
testcase_04 | AC | 93 ms
71,768 KB |
testcase_05 | AC | 90 ms
71,800 KB |
testcase_06 | AC | 89 ms
71,464 KB |
testcase_07 | AC | 91 ms
71,632 KB |
testcase_08 | AC | 93 ms
71,812 KB |
testcase_09 | AC | 92 ms
71,520 KB |
testcase_10 | AC | 91 ms
71,292 KB |
testcase_11 | AC | 91 ms
71,804 KB |
testcase_12 | AC | 92 ms
71,524 KB |
testcase_13 | AC | 93 ms
71,292 KB |
testcase_14 | AC | 92 ms
71,644 KB |
testcase_15 | AC | 91 ms
71,364 KB |
testcase_16 | AC | 93 ms
71,824 KB |
testcase_17 | AC | 94 ms
71,664 KB |
testcase_18 | AC | 93 ms
71,792 KB |
testcase_19 | AC | 91 ms
71,508 KB |
testcase_20 | AC | 91 ms
71,300 KB |
testcase_21 | TLE | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
ソースコード
n,h = map(int, input().split()) A = list(map(int, input().split())) import math def factorize(n): d = {} temp = int(math.sqrt(n))+1 for i in range(2, temp): while n%i== 0: n //= i if i in d: d[i] += 1 else: d[i] = 1 if d == {}: d[n] = 1 else: if n in d: d[n] += 1 elif n != 1: d[n] =1 return d d = factorize(h) from collections import defaultdict c = defaultdict(lambda:0) for a in A: a = abs(a) for k in d.keys(): cnt = 0 while a%k == 0: a //= k cnt += 1 c[k] += cnt #print(c) #print(d) for k, v in d.items(): if v > c[k]: print('NO') exit() else: print('YES')