結果

問題 No.2954 Calculation of Exponentiation
ユーザー hirayuu_yc
提出日時 2024-11-08 21:40:29
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 300 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 65,152 KB
最終ジャッジ日時 2024-11-08 21:40:35
合計ジャッジ時間 3,040 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 12 RE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=input().split()
if A[-4:]!="0000":
	assert False
	print("No")
	exit()
if B[0]=="-":
	assert False
	print("No")
	exit()
A=int(A[:-5])
z=int(B[:-5]+B[-4:])
w=10000
ans="No"
for i in range(2,200000):
	x=0
	a=A
	while a%i==0:
		a//=i
		x+=1
	if a!=1:
		continue
	if (x*z)%w==0:
		ans="Yes"
print(ans)
0