結果

問題 No.1271 初めての級数
ユーザー googol_S0googol_S0
提出日時 2020-11-02 15:12:07
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 118 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 71,716 KB
最終ジャッジ日時 2023-09-29 11:51:54
合計ジャッジ時間 2,036 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,388 KB
testcase_01 AC 71 ms
71,448 KB
testcase_02 AC 74 ms
71,436 KB
testcase_03 AC 71 ms
71,692 KB
testcase_04 AC 73 ms
71,716 KB
testcase_05 AC 70 ms
71,380 KB
testcase_06 AC 73 ms
71,352 KB
testcase_07 AC 73 ms
71,156 KB
testcase_08 AC 74 ms
71,428 KB
testcase_09 AC 73 ms
71,380 KB
testcase_10 AC 72 ms
71,248 KB
testcase_11 AC 71 ms
71,260 KB
testcase_12 AC 70 ms
71,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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