結果

問題 No.1271 初めての級数
ユーザー tanon_710tanon_710
提出日時 2020-10-30 22:02:12
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 154 bytes
コンパイル時間 277 ms
使用メモリ 75,928 KB
最終ジャッジ日時 2023-02-21 12:34:52
合計ジャッジ時間 2,514 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 81 ms
75,756 KB
testcase_01 AC 80 ms
75,720 KB
testcase_02 AC 81 ms
75,792 KB
testcase_03 AC 83 ms
75,788 KB
testcase_04 AC 82 ms
75,772 KB
testcase_05 AC 82 ms
75,552 KB
testcase_06 AC 82 ms
75,768 KB
testcase_07 AC 83 ms
75,824 KB
testcase_08 AC 82 ms
75,760 KB
testcase_09 AC 83 ms
75,924 KB
testcase_10 AC 83 ms
75,928 KB
testcase_11 AC 84 ms
75,856 KB
testcase_12 AC 82 ms
75,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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