結果

問題 No.1271 初めての級数
ユーザー ygd.ygd.
提出日時 2020-10-30 21:27:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 121 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 87,320 KB
実行使用メモリ 76,616 KB
最終ジャッジ日時 2023-09-29 04:46:42
合計ジャッジ時間 3,537 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 170 ms
76,584 KB
testcase_01 AC 169 ms
76,616 KB
testcase_02 AC 172 ms
76,492 KB
testcase_03 AC 170 ms
76,420 KB
testcase_04 AC 169 ms
76,288 KB
testcase_05 AC 169 ms
76,108 KB
testcase_06 AC 170 ms
76,256 KB
testcase_07 AC 172 ms
76,060 KB
testcase_08 AC 173 ms
76,592 KB
testcase_09 AC 172 ms
76,580 KB
testcase_10 AC 174 ms
76,280 KB
testcase_11 AC 172 ms
76,432 KB
testcase_12 AC 170 ms
76,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
k=int(input())
MAX = pow(10,7)
ans = 0
for i in range(1,MAX):
  temp = (1/(i*(i+k)))
  ans += temp
print(ans)
0