結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー pluto77pluto77
提出日時 2022-02-10 11:17:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 314 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 8,676 KB
最終ジャッジ日時 2023-09-08 00:18:15
合計ジャッジ時間 5,434 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,652 KB
testcase_01 AC 19 ms
8,588 KB
testcase_02 AC 19 ms
8,600 KB
testcase_03 AC 23 ms
8,644 KB
testcase_04 AC 159 ms
8,496 KB
testcase_05 AC 55 ms
8,488 KB
testcase_06 AC 25 ms
8,532 KB
testcase_07 AC 19 ms
8,468 KB
testcase_08 AC 50 ms
8,608 KB
testcase_09 AC 20 ms
8,480 KB
testcase_10 AC 61 ms
8,544 KB
testcase_11 AC 19 ms
8,480 KB
testcase_12 AC 26 ms
8,500 KB
testcase_13 AC 18 ms
8,604 KB
testcase_14 AC 20 ms
8,660 KB
testcase_15 AC 221 ms
8,532 KB
testcase_16 AC 69 ms
8,616 KB
testcase_17 AC 240 ms
8,632 KB
testcase_18 AC 119 ms
8,504 KB
testcase_19 AC 79 ms
8,608 KB
testcase_20 AC 45 ms
8,660 KB
testcase_21 AC 127 ms
8,532 KB
testcase_22 AC 52 ms
8,552 KB
testcase_23 AC 68 ms
8,504 KB
testcase_24 AC 20 ms
8,504 KB
testcase_25 AC 128 ms
8,648 KB
testcase_26 AC 42 ms
8,504 KB
testcase_27 AC 19 ms
8,628 KB
testcase_28 AC 145 ms
8,656 KB
testcase_29 AC 111 ms
8,460 KB
testcase_30 AC 214 ms
8,540 KB
testcase_31 AC 107 ms
8,644 KB
testcase_32 AC 40 ms
8,640 KB
testcase_33 AC 18 ms
8,524 KB
testcase_34 AC 18 ms
8,636 KB
testcase_35 AC 17 ms
8,492 KB
testcase_36 AC 314 ms
8,472 KB
testcase_37 AC 18 ms
8,528 KB
testcase_38 AC 18 ms
8,592 KB
testcase_39 AC 17 ms
8,660 KB
testcase_40 AC 17 ms
8,620 KB
testcase_41 AC 18 ms
8,496 KB
testcase_42 AC 18 ms
8,672 KB
testcase_43 AC 18 ms
8,676 KB
testcase_44 AC 18 ms
8,500 KB
testcase_45 AC 18 ms
8,484 KB
testcase_46 AC 17 ms
8,456 KB
testcase_47 AC 18 ms
8,624 KB
testcase_48 AC 18 ms
8,640 KB
testcase_49 AC 17 ms
8,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
def factorize(x):
 i=2
 p=defaultdict(int)
 while i*i<=x:
  while x%i==0:
   x//=i
   p[i]+=1
  i+=1
 if x>1:
  p[x]+=1
 return p
	
x,a,y,b=map(int,input().split())
X=factorize(x)
Y=factorize(y)
ok=True
for key in Y:
 if Y[key]*b>X[key]*a:
  ok=False
  break
print('Yes' if ok else 'No')
0