結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー 河野竜也河野竜也
提出日時 2022-06-22 19:03:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-23 22:49:10
合計ジャッジ時間 7,450 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,880 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 27 ms
10,880 KB
testcase_03 AC 116 ms
10,880 KB
testcase_04 AC 189 ms
10,880 KB
testcase_05 AC 137 ms
10,752 KB
testcase_06 AC 147 ms
10,752 KB
testcase_07 AC 117 ms
10,752 KB
testcase_08 AC 211 ms
10,752 KB
testcase_09 AC 128 ms
10,752 KB
testcase_10 AC 178 ms
10,752 KB
testcase_11 AC 133 ms
10,752 KB
testcase_12 AC 169 ms
10,880 KB
testcase_13 AC 176 ms
10,880 KB
testcase_14 AC 68 ms
10,752 KB
testcase_15 AC 152 ms
10,752 KB
testcase_16 AC 175 ms
10,752 KB
testcase_17 AC 167 ms
10,752 KB
testcase_18 AC 180 ms
10,752 KB
testcase_19 AC 139 ms
10,752 KB
testcase_20 AC 106 ms
10,880 KB
testcase_21 AC 143 ms
10,752 KB
testcase_22 AC 131 ms
10,752 KB
testcase_23 AC 182 ms
10,880 KB
testcase_24 AC 108 ms
10,752 KB
testcase_25 AC 192 ms
10,880 KB
testcase_26 AC 171 ms
10,752 KB
testcase_27 AC 165 ms
10,880 KB
testcase_28 AC 165 ms
10,752 KB
testcase_29 AC 189 ms
10,880 KB
testcase_30 AC 205 ms
10,752 KB
testcase_31 AC 161 ms
10,752 KB
testcase_32 AC 178 ms
10,880 KB
testcase_33 AC 142 ms
10,752 KB
testcase_34 AC 147 ms
10,752 KB
testcase_35 AC 145 ms
10,752 KB
testcase_36 AC 211 ms
10,752 KB
testcase_37 AC 24 ms
10,752 KB
testcase_38 AC 24 ms
10,752 KB
testcase_39 AC 24 ms
10,752 KB
testcase_40 AC 82 ms
10,752 KB
testcase_41 AC 24 ms
10,752 KB
testcase_42 AC 25 ms
10,752 KB
testcase_43 AC 25 ms
10,752 KB
testcase_44 AC 25 ms
10,880 KB
testcase_45 AC 83 ms
10,752 KB
testcase_46 AC 96 ms
10,880 KB
testcase_47 AC 111 ms
10,752 KB
testcase_48 AC 26 ms
10,752 KB
testcase_49 AC 56 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
def prime(n):
  m=int(n**0.5)+1
  d=defaultdict(int)
  for i in range(2,m):
    if n%i==0:
      while n%i==0:
        n//=i
        d[i]+=1
  if n!=1:
    d[n]+=1
  return d

x,a,y,b=map(int,input().split())
c=prime(x)
e=prime(y)
flag=True
for key in e:
  if e[key]*b>c[key]*a:
    flag=False
    break
print("Yes" if flag else "No")
0