結果

問題 No.2189 六平方和
ユーザー testestesttestestest
提出日時 2022-12-16 02:31:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 504 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 87,352 KB
実行使用メモリ 239,652 KB
最終ジャッジ日時 2023-08-17 20:35:11
合計ジャッジ時間 8,585 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
76,652 KB
testcase_01 AC 110 ms
76,868 KB
testcase_02 AC 113 ms
76,980 KB
testcase_03 AC 107 ms
76,760 KB
testcase_04 AC 113 ms
77,020 KB
testcase_05 AC 112 ms
76,804 KB
testcase_06 AC 110 ms
76,964 KB
testcase_07 AC 108 ms
76,680 KB
testcase_08 AC 112 ms
76,804 KB
testcase_09 AC 113 ms
76,844 KB
testcase_10 AC 108 ms
76,448 KB
testcase_11 AC 379 ms
224,104 KB
testcase_12 AC 504 ms
224,196 KB
testcase_13 AC 115 ms
76,732 KB
testcase_14 AC 116 ms
76,948 KB
testcase_15 AC 112 ms
76,664 KB
testcase_16 AC 106 ms
76,684 KB
testcase_17 AC 112 ms
76,772 KB
testcase_18 AC 201 ms
119,204 KB
testcase_19 AC 338 ms
208,944 KB
testcase_20 AC 369 ms
239,552 KB
testcase_21 AC 337 ms
239,412 KB
testcase_22 AC 336 ms
239,112 KB
testcase_23 AC 372 ms
224,236 KB
testcase_24 AC 336 ms
239,572 KB
testcase_25 AC 319 ms
223,932 KB
testcase_26 AC 364 ms
224,184 KB
testcase_27 AC 327 ms
239,652 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