結果

問題 No.1058 素敵な数
ユーザー ttr
提出日時 2020-05-24 21:48:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 300 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-10-12 08:26:42
合計ジャッジ時間 2,120 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if N == 1:
    ans = 1
else:
    num = 1
    M = 10**5
    L = [0]*(M+1)
    for i in range(2, M+1):
        if L[i] == 0:
            num *= i
            j = 1
            while i*j <= M:
                L[i*j] = 1
                j += 1
    ans = (num+1)*pow(M+1, N-1)
print(ans)
0