結果

問題 No.1058 素敵な数
ユーザー ttrttr
提出日時 2020-05-24 21:48:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 300 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-04-20 13:02:05
合計ジャッジ時間 2,221 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
10,752 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

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