結果

問題 No.1273 はじめのζ関数
ユーザー kotatsuinu5kotatsuinu5
提出日時 2020-10-30 23:03:14
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 1,400 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 62 ms
使用メモリ 9,820 KB
最終ジャッジ日時 2023-02-21 15:45:14
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 34 ms
7,844 KB
testcase_01 AC 32 ms
7,764 KB
testcase_02 AC 32 ms
7,848 KB
testcase_03 AC 32 ms
7,868 KB
testcase_04 AC 33 ms
7,688 KB
testcase_05 AC 55 ms
7,928 KB
testcase_06 AC 32 ms
7,824 KB
testcase_07 AC 33 ms
7,712 KB
testcase_08 AC 32 ms
7,768 KB
testcase_09 AC 32 ms
7,876 KB
testcase_10 AC 33 ms
9,820 KB
testcase_11 AC 37 ms
7,920 KB
testcase_12 AC 32 ms
7,816 KB
testcase_13 AC 32 ms
7,812 KB
testcase_14 AC 33 ms
9,704 KB
testcase_15 AC 32 ms
9,728 KB
testcase_16 AC 33 ms
9,632 KB
testcase_17 AC 32 ms
7,816 KB
testcase_18 AC 32 ms
7,872 KB
testcase_19 AC 32 ms
7,672 KB
testcase_20 AC 1,400 ms
7,872 KB
testcase_21 AC 15 ms
9,820 KB
testcase_22 AC 28 ms
9,728 KB
testcase_23 AC 16 ms
9,696 KB
testcase_24 AC 20 ms
7,680 KB
testcase_25 AC 15 ms
7,688 KB
testcase_26 AC 15 ms
7,784 KB
testcase_27 AC 16 ms
7,608 KB
testcase_28 AC 16 ms
7,856 KB
testcase_29 AC 15 ms
7,808 KB
testcase_30 AC 15 ms
7,744 KB
testcase_31 AC 16 ms
7,672 KB
testcase_32 AC 15 ms
7,796 KB
testcase_33 AC 16 ms
7,744 KB
testcase_34 AC 15 ms
7,700 KB
testcase_35 AC 27 ms
7,748 KB
testcase_36 AC 16 ms
7,792 KB
testcase_37 AC 16 ms
9,700 KB
testcase_38 AC 15 ms
9,724 KB
testcase_39 AC 16 ms
7,852 KB
testcase_40 AC 535 ms
7,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
x=int(input())

ans=0

for j in range(x,3000):
    tmp=0
    for i in range(1,1000000):
        tmp+=1/(i**j)
        if i**j>10**17:
            break
    tmp=(tmp-1)
    ans+=tmp

if x==2:
    print(1000000)
else:
    print(math.floor((ans)*(10**6)))
0