結果

問題 No.1255 ハイレーツ・オブ・ボリビアン
ユーザー 👑 emthrmemthrm
提出日時 2020-10-09 22:38:50
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 259 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 12,592 KB
最終ジャッジ日時 2023-09-27 18:34:33
合計ジャッジ時間 4,756 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,136 KB
testcase_01 AC 16 ms
7,788 KB
testcase_02 AC 17 ms
7,788 KB
testcase_03 AC 17 ms
7,760 KB
testcase_04 AC 17 ms
7,680 KB
testcase_05 AC 137 ms
7,796 KB
testcase_06 AC 199 ms
7,832 KB
testcase_07 AC 156 ms
7,760 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