結果

問題 No.2189 六平方和
ユーザー shobonvip
提出日時 2023-01-13 22:27:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 57,984 KB
最終ジャッジ日時 2024-12-24 18:07:19
合計ジャッジ時間 3,142 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, b = map(int,input().split())
targ = pow(m, n, b)

g = []
for j in range(6):
	i = 0
	while True:
		if (i + 1) ** 2 > targ:
			break
		i += 1
	targ = targ - i * i
	g.append(i)

for i in range(6):
	if g[i] == 0:
		g[i] += b

#print(targ)
print("YES")
print(*g)
0