結果
| 問題 |
No.1232 2^x = x
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-27 09:17:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| コード長 | 220 bytes |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 82,260 KB |
| 実行使用メモリ | 65,152 KB |
| 最終ジャッジ日時 | 2024-06-30 10:29:40 |
| 合計ジャッジ時間 | 1,082 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
n=int(input())
from math import gcd
def lcm(a,b):
x= a*b // gcd(a,b)
return x
for _ in range(n):
p=int(input())
if p==2:
print(2)
continue
lcm1=lcm(p, p-1)
print(lcm1-(p-2))