結果
問題 |
No.1723 [Cherry 3rd Tune *] Dead on
|
ユーザー |
![]() |
提出日時 | 2024-01-15 03:04:42 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 793 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 61,036 KB |
最終ジャッジ日時 | 2024-09-28 02:10:48 |
合計ジャッジ時間 | 4,353 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 1 |
ソースコード
from collections import * def factorization(n): arr = [] temp = n for i in range(2, int(-(-n**0.5 // 1)) + 1): if temp % i == 0: cnt = 0 while temp % i == 0: cnt += 1 temp //= i arr.append([i, cnt]) if temp != 1: arr.append([temp, 1]) if arr == []: arr.append([n, 1]) return arr x, a, y, b = map(int, input().split()) if x == 1: if y == 1: print("Yes") exit() else: print("No") exit() xl, yl = factorization(x), factorization(y) dx, dy = defaultdict(int), defaultdict(int) for li in xl: num, j = li dx[num] = j * a for li in yl: num, j = li if dx[num] < j * b: print("No") exit() print("Yes")