結果

問題 No.1271 初めての級数
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2020-10-30 21:34:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 71,624 KB
最終ジャッジ日時 2023-09-29 05:05:48
合計ジャッジ時間 1,915 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,620 KB
testcase_01 AC 66 ms
71,572 KB
testcase_02 AC 66 ms
71,580 KB
testcase_03 AC 66 ms
71,372 KB
testcase_04 AC 65 ms
71,464 KB
testcase_05 AC 65 ms
71,184 KB
testcase_06 AC 71 ms
71,408 KB
testcase_07 AC 72 ms
71,324 KB
testcase_08 AC 66 ms
71,568 KB
testcase_09 AC 65 ms
71,208 KB
testcase_10 AC 64 ms
71,232 KB
testcase_11 AC 66 ms
71,236 KB
testcase_12 AC 65 ms
71,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
k = int(input())
if k == 0:
    print(math.pi**2/6)
    exit()
ans = 0
for i in range(1,k+1):
    ans += 1/i
print(ans/k)
0