結果

問題 No.2189 六平方和
ユーザー shobonvipshobonvip
提出日時 2023-01-13 22:27:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 991 ms
コンパイル使用メモリ 86,536 KB
実行使用メモリ 75,816 KB
最終ジャッジ日時 2023-08-26 04:10:54
合計ジャッジ時間 5,421 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,272 KB
testcase_01 AC 71 ms
71,280 KB
testcase_02 AC 70 ms
71,196 KB
testcase_03 AC 71 ms
71,316 KB
testcase_04 AC 71 ms
71,272 KB
testcase_05 AC 71 ms
71,300 KB
testcase_06 AC 70 ms
71,404 KB
testcase_07 AC 72 ms
71,412 KB
testcase_08 AC 71 ms
71,452 KB
testcase_09 AC 70 ms
71,372 KB
testcase_10 AC 72 ms
71,052 KB
testcase_11 AC 72 ms
71,360 KB
testcase_12 AC 70 ms
71,480 KB
testcase_13 AC 71 ms
71,348 KB
testcase_14 AC 71 ms
71,416 KB
testcase_15 AC 71 ms
71,420 KB
testcase_16 AC 71 ms
71,236 KB
testcase_17 AC 72 ms
71,296 KB
testcase_18 AC 72 ms
71,060 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 73 ms
75,816 KB
testcase_22 AC 73 ms
75,388 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 76 ms
75,700 KB
testcase_27 AC 74 ms
75,580 KB
権限があれば一括ダウンロードができます

ソースコード

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