結果

問題 No.1271 初めての級数
ユーザー ayaoniayaoni
提出日時 2020-10-30 21:21:42
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 506 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 79,100 KB
最終ジャッジ日時 2023-09-29 04:35:53
合計ジャッジ時間 2,250 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 75 ms
71,396 KB
testcase_02 AC 74 ms
71,332 KB
testcase_03 AC 73 ms
71,504 KB
testcase_04 AC 74 ms
71,320 KB
testcase_05 AC 74 ms
71,252 KB
testcase_06 AC 73 ms
71,584 KB
testcase_07 AC 74 ms
71,160 KB
testcase_08 AC 72 ms
71,340 KB
testcase_09 AC 72 ms
71,252 KB
testcase_10 AC 76 ms
71,232 KB
testcase_11 AC 74 ms
71,488 KB
testcase_12 AC 72 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def LS2(): return list(sys.stdin.readline().rstrip())


k = I()
a = sum(1/i for i in range(1,k+1))
print(a/k)
0