結果
| 問題 |
No.2755 行列の共役類
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-24 13:02:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 544 bytes |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 67,596 KB |
| 最終ジャッジ日時 | 2024-07-22 02:53:48 |
| 合計ジャッジ時間 | 5,752 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 66 |
ソースコード
import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
INF = 2**63-1
mod = 998244353
from collections import Counter
n = ii()
def euler_phi(n):
res = n
x = 2
while x*x <= n:
if n % x == 0:
res = res // x * (x-1)
while n % x == 0:
n //= x
x += 1
if n > 1:
res = res // n * (n-1)
return res
ans = n * euler_phi(n)
if ans > 1000:
print("1000+")
else:
print(ans)