結果

問題 No.2189 六平方和
ユーザー testestesttestestest
提出日時 2022-12-16 02:31:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 310 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 240,048 KB
最終ジャッジ日時 2024-05-05 03:28:49
合計ジャッジ時間 5,408 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
75,904 KB
testcase_01 AC 59 ms
75,264 KB
testcase_02 AC 59 ms
75,520 KB
testcase_03 AC 63 ms
75,392 KB
testcase_04 AC 63 ms
75,520 KB
testcase_05 AC 64 ms
75,648 KB
testcase_06 AC 65 ms
75,648 KB
testcase_07 AC 66 ms
75,520 KB
testcase_08 AC 66 ms
75,520 KB
testcase_09 AC 65 ms
75,392 KB
testcase_10 AC 65 ms
75,648 KB
testcase_11 AC 304 ms
239,744 KB
testcase_12 AC 310 ms
239,616 KB
testcase_13 AC 64 ms
75,888 KB
testcase_14 AC 64 ms
75,648 KB
testcase_15 AC 61 ms
75,648 KB
testcase_16 AC 65 ms
75,392 KB
testcase_17 AC 64 ms
75,684 KB
testcase_18 AC 130 ms
118,016 KB
testcase_19 AC 247 ms
222,208 KB
testcase_20 AC 276 ms
239,872 KB
testcase_21 AC 264 ms
239,616 KB
testcase_22 AC 245 ms
239,872 KB
testcase_23 AC 299 ms
240,048 KB
testcase_24 AC 268 ms
240,000 KB
testcase_25 AC 283 ms
238,976 KB
testcase_26 AC 282 ms
239,616 KB
testcase_27 AC 256 ms
240,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,B=map(int,input().split())
X=pow(M,N,B)
print("YES")

d={i*i%B:i for i in range(10**6)}

import random
while True:
  a=random.randint(0,B-1)
  b=random.randint(0,B-1)
  c=random.randint(0,B-1)
  dd=(X-a*a-b*b-c*c)%B
  if dd in d:
    print(a,b,c,d[dd],0,0)
    exit()
0