結果

問題 No.1271 初めての級数
ユーザー marroncastlemarroncastle
提出日時 2020-10-30 21:32:13
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 128 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 79,168 KB
最終ジャッジ日時 2023-09-29 05:00:58
合計ジャッジ時間 2,214 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 73 ms
71,328 KB
testcase_02 AC 72 ms
71,752 KB
testcase_03 AC 72 ms
71,168 KB
testcase_04 AC 74 ms
71,516 KB
testcase_05 AC 75 ms
71,364 KB
testcase_06 AC 74 ms
71,564 KB
testcase_07 AC 74 ms
71,500 KB
testcase_08 AC 74 ms
71,360 KB
testcase_09 AC 74 ms
71,468 KB
testcase_10 AC 75 ms
71,240 KB
testcase_11 AC 75 ms
71,640 KB
testcase_12 AC 73 ms
71,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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