結果

問題 No.1271 初めての級数
ユーザー 👑 KazunKazun
提出日時 2020-10-30 21:25:20
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 268 ms
使用メモリ 75,916 KB
最終ジャッジ日時 2023-02-21 10:39:05
合計ジャッジ時間 2,414 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 86 ms
75,912 KB
testcase_01 AC 85 ms
75,768 KB
testcase_02 AC 86 ms
75,916 KB
testcase_03 AC 85 ms
75,612 KB
testcase_04 AC 86 ms
75,732 KB
testcase_05 AC 86 ms
75,792 KB
testcase_06 AC 86 ms
75,772 KB
testcase_07 AC 85 ms
75,788 KB
testcase_08 AC 85 ms
75,792 KB
testcase_09 AC 85 ms
75,788 KB
testcase_10 AC 86 ms
75,844 KB
testcase_11 AC 86 ms
75,816 KB
testcase_12 AC 85 ms
75,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import pi
k=int(input())

if k==0:
    print((pi**2)/6)
else:
    x=0
    for i in range(1,k+1):
        x+=1/i

    print(x/k)
0