結果
| 問題 |
No.1271 初めての級数
|
| コンテスト | |
| ユーザー |
kotatsuinu5
|
| 提出日時 | 2020-10-30 22:08:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 258 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 125 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-22 00:45:27 |
| 合計ジャッジ時間 | 1,447 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
N=int(input())
if N==0:
goukei=0
for i in range(1000000):
goukei+=1/((i+1)**2)
print(goukei)
else:
mul=1
for i in range(N):
mul*=(i+1)
goukei=0
for i in range(N):
goukei+=mul/(i+1)
print(goukei/mul/N)
kotatsuinu5