結果

問題 No.1723 [Cherry 3rd Tune *] Dead on
ユーザー mrngmrng
提出日時 2021-11-21 13:36:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 250 ms / 2,000 ms
コード長 600 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 87,192 KB
実行使用メモリ 242,932 KB
最終ジャッジ日時 2023-09-04 22:25:28
合計ジャッジ時間 10,212 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,684 KB
testcase_01 AC 74 ms
71,760 KB
testcase_02 AC 72 ms
71,796 KB
testcase_03 AC 220 ms
211,168 KB
testcase_04 AC 194 ms
225,892 KB
testcase_05 AC 219 ms
224,720 KB
testcase_06 AC 220 ms
224,124 KB
testcase_07 AC 166 ms
177,596 KB
testcase_08 AC 250 ms
224,460 KB
testcase_09 AC 173 ms
167,476 KB
testcase_10 AC 176 ms
189,580 KB
testcase_11 AC 235 ms
224,620 KB
testcase_12 AC 225 ms
224,324 KB
testcase_13 AC 237 ms
224,460 KB
testcase_14 AC 119 ms
115,616 KB
testcase_15 AC 179 ms
189,480 KB
testcase_16 AC 222 ms
224,324 KB
testcase_17 AC 186 ms
197,696 KB
testcase_18 AC 184 ms
177,872 KB
testcase_19 AC 122 ms
119,852 KB
testcase_20 AC 134 ms
134,860 KB
testcase_21 AC 180 ms
178,084 KB
testcase_22 AC 169 ms
177,800 KB
testcase_23 AC 191 ms
211,176 KB
testcase_24 AC 157 ms
149,540 KB
testcase_25 AC 237 ms
224,344 KB
testcase_26 AC 155 ms
167,288 KB
testcase_27 AC 230 ms
224,832 KB
testcase_28 AC 176 ms
178,024 KB
testcase_29 AC 163 ms
177,456 KB
testcase_30 AC 220 ms
224,816 KB
testcase_31 AC 174 ms
167,364 KB
testcase_32 AC 231 ms
224,656 KB
testcase_33 AC 94 ms
76,036 KB
testcase_34 AC 94 ms
76,000 KB
testcase_35 AC 74 ms
71,708 KB
testcase_36 AC 224 ms
242,932 KB
testcase_37 AC 76 ms
71,312 KB
testcase_38 AC 75 ms
71,184 KB
testcase_39 AC 74 ms
71,304 KB
testcase_40 AC 72 ms
71,640 KB
testcase_41 AC 74 ms
71,612 KB
testcase_42 AC 73 ms
71,296 KB
testcase_43 AC 74 ms
71,808 KB
testcase_44 AC 74 ms
71,628 KB
testcase_45 AC 94 ms
76,464 KB
testcase_46 AC 90 ms
76,136 KB
testcase_47 AC 72 ms
71,656 KB
testcase_48 AC 82 ms
75,856 KB
testcase_49 AC 78 ms
71,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x,a,y,b = map(int,input().split())
if x==1:
	if y==1: print('Yes')
	else: print('No')
	exit()
if y==1:
	print('Yes')
	exit()
n = x
rep = int(n**0.5)+1
plist = dict()
for i in range(2,rep):
	c = 0
	while n%i==0:
		n //= i
		c += 1
	plist[i] = c
	if n==1: break
if n!=1:
	plist[n] = 1
ok = True
n = y
rep = int(n**0.5)+1
for i in range(2,rep):
	c = 0
	while n%i==0:
		n //= i
		c += 1
	if c>0:
		if plist.get(i) is None:
			ok = False; break
		if plist[i]*a<c*b:
			ok = False; break
if n!=1:
	if plist.get(n) is None:
		ok = False
	elif plist[n]*a<b:
		ok = False
if ok: print('Yes')
else: print('No')
0