結果
| 問題 |
No.1409 Simple Math in yukicoder
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-02 12:52:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 339 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 81,792 KB |
| 最終ジャッジ日時 | 2024-10-03 01:41:17 |
| 合計ジャッジ時間 | 34,734 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 22 TLE * 4 -- * 32 |
ソースコード
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)