結果
| 問題 | No.65 回数の期待値の練習 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2023-08-15 01:23:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 5,000 ms |
| コード長 | 240 bytes |
| コンパイル時間 | 248 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 55,040 KB |
| 最終ジャッジ日時 | 2024-11-23 04:03:18 |
| 合計ジャッジ時間 | 2,184 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
from functools import cache
import sys
sys.setrecursionlimit(10 ** 6)
@cache
def f(n: int):
if n <= 0: return 0
res = 1
for i in range(1, 7):
res += f(n - i) / 6
return res
K = int(input())
ans = f(K)
print(ans)
norioc