結果

問題 No.1409 Simple Math in yukicoder
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-03-02 12:52:39
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 339 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 76,960 KB
最終ジャッジ日時 2024-04-14 04:34:09
合計ジャッジ時間 35,553 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
60,492 KB
testcase_01 AC 43 ms
52,564 KB
testcase_02 AC 40 ms
52,940 KB
testcase_03 AC 38 ms
52,244 KB
testcase_04 AC 37 ms
53,252 KB
testcase_05 AC 37 ms
52,764 KB
testcase_06 AC 39 ms
54,104 KB
testcase_07 AC 687 ms
67,552 KB
testcase_08 TLE -
testcase_09 AC 606 ms
67,628 KB
testcase_10 AC 1,789 ms
74,532 KB
testcase_11 TLE -
testcase_12 AC 1,716 ms
74,700 KB
testcase_13 AC 686 ms
67,568 KB
testcase_14 AC 548 ms
67,504 KB
testcase_15 AC 824 ms
69,680 KB
testcase_16 AC 859 ms
68,556 KB
testcase_17 TLE -
testcase_18 AC 1,480 ms
71,532 KB
testcase_19 AC 1,574 ms
74,300 KB
testcase_20 AC 1,279 ms
72,892 KB
testcase_21 AC 1,026 ms
70,016 KB
testcase_22 AC 1,904 ms
76,240 KB
testcase_23 AC 432 ms
65,844 KB
testcase_24 AC 348 ms
65,208 KB
testcase_25 AC 1,847 ms
76,096 KB
testcase_26 AC 1,995 ms
76,960 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main(u,x):
  p=x*u+1
  if u==1:return list(range(1,p))
  ary=[]
  for i in range(1,p):
    if pow(i,x,p)==1:
      ary.append(i)
      if len(ary)==x:
        break
  return ary

if __name__=='__main__':
  t=int(input())
  cases=[list(map(int,input().split())) for _ in range(t)]
  for u,x in cases:
    ret=main(u,x)
    print(*ret)
0