結果

問題 No.1271 初めての級数
ユーザー brthyyjpbrthyyjp
提出日時 2020-11-01 18:10:07
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 71,492 KB
最終ジャッジ日時 2023-09-29 11:19:13
合計ジャッジ時間 1,981 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,172 KB
testcase_01 AC 70 ms
71,020 KB
testcase_02 AC 72 ms
71,200 KB
testcase_03 AC 73 ms
71,136 KB
testcase_04 AC 75 ms
71,252 KB
testcase_05 AC 73 ms
71,176 KB
testcase_06 AC 72 ms
71,352 KB
testcase_07 AC 70 ms
71,384 KB
testcase_08 AC 69 ms
71,020 KB
testcase_09 AC 72 ms
71,056 KB
testcase_10 AC 71 ms
71,356 KB
testcase_11 AC 68 ms
71,224 KB
testcase_12 AC 68 ms
71,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

k = int(input())

import math
if k == 0:
    ans = math.pi**2/6
    print(ans)
    exit()

ans = 0
for i in range(1, k+1):
    ans += 1/i
ans /= k
print(ans)
0