結果

問題 No.1255 ハイレーツ・オブ・ボリビアン
ユーザー 👑 emthrmemthrm
提出日時 2020-10-09 22:39:12
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 259 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,564 KB
実行使用メモリ 145,780 KB
最終ジャッジ日時 2023-09-27 18:34:53
合計ジャッジ時間 4,688 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
145,780 KB
testcase_01 AC 74 ms
74,876 KB
testcase_02 AC 74 ms
74,816 KB
testcase_03 AC 78 ms
75,248 KB
testcase_04 AC 74 ms
74,872 KB
testcase_05 AC 101 ms
74,972 KB
testcase_06 AC 114 ms
74,980 KB
testcase_07 AC 104 ms
74,820 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# https://joho-ka.mints.ne.jp/primitive-root-and-order
def n_order(i, n):
  k = 1
  l = i
  while l != 1:
    l = (l * i) % n
    k += 1
  return k

t = int(input())
for tc in range(t):
  n = int(input())
  print(1 if n == 1 else n_order(2, (n - 1) * 2 + 1))
0