結果
| 問題 | No.3028 No.9999 |
| コンテスト | |
| ユーザー |
kidodesu
|
| 提出日時 | 2025-02-21 21:35:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 483 bytes |
| 記録 | |
| コンパイル時間 | 150 ms |
| コンパイル使用メモリ | 85,072 KB |
| 実行使用メモリ | 58,368 KB |
| 最終ジャッジ日時 | 2026-07-04 21:48:37 |
| 合計ジャッジ時間 | 1,674 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 1 |
ソースコード
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
n = int(input())
N = n
n = euler_phi(n)
C = set()
for i in range(1, int(n**(1/2))+1):
if n % i == 0:
C.add(i)
C.add(n//i)
C = list(C)
C.sort()
for c in C:
if pow(10, c, N) == 1:
print(c)
exit()
kidodesu