結果

問題 No.1271 初めての級数
ユーザー 👑 KazunKazun
提出日時 2020-10-30 21:25:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 137 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 71,644 KB
最終ジャッジ日時 2023-09-29 04:43:03
合計ジャッジ時間 2,047 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,088 KB
testcase_01 AC 73 ms
71,548 KB
testcase_02 AC 72 ms
71,112 KB
testcase_03 AC 75 ms
71,072 KB
testcase_04 AC 74 ms
71,108 KB
testcase_05 AC 72 ms
71,644 KB
testcase_06 AC 73 ms
71,184 KB
testcase_07 AC 73 ms
71,360 KB
testcase_08 AC 72 ms
71,308 KB
testcase_09 AC 73 ms
71,608 KB
testcase_10 AC 72 ms
71,052 KB
testcase_11 AC 72 ms
71,196 KB
testcase_12 AC 72 ms
71,620 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