結果

問題 No.1271 初めての級数
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-10-07 09:56:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 124 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 71,324 KB
最終ジャッジ日時 2023-09-30 09:00:51
合計ジャッジ時間 2,055 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 68 ms
71,032 KB
testcase_02 AC 68 ms
70,964 KB
testcase_03 AC 69 ms
70,904 KB
testcase_04 AC 73 ms
71,120 KB
testcase_05 AC 69 ms
71,184 KB
testcase_06 AC 68 ms
71,260 KB
testcase_07 AC 69 ms
71,324 KB
testcase_08 AC 69 ms
70,892 KB
testcase_09 AC 68 ms
71,260 KB
testcase_10 AC 70 ms
71,212 KB
testcase_11 AC 70 ms
71,048 KB
testcase_12 AC 71 ms
71,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

k = int(input())
ans = 0
if k == 1:
    ans = 1
else:
    for i in range(1,k+1):
        ans += (1 / k) * (1 / i)
print(ans)
0