結果
| 問題 |
No.65 回数の期待値の練習
|
| コンテスト | |
| ユーザー |
buey_t
|
| 提出日時 | 2023-03-17 17:17:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 5,000 ms |
| コード長 | 1,357 bytes |
| コンパイル時間 | 357 ms |
| コンパイル使用メモリ | 81,860 KB |
| 実行使用メモリ | 85,244 KB |
| 最終ジャッジ日時 | 2024-09-18 10:03:26 |
| 合計ジャッジ時間 | 3,257 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
def main():
try:
import pypyjit
pypyjit.set_param('max_unroll_recursion=-1')
except:
pass
try:
import sys
sys.setrecursionlimit(10**7)
except:
pass
from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
from heapq import heapify, heappop, heappush
from bisect import bisect_left, bisect_right
from copy import deepcopy
import copy
import random
from collections import deque,Counter,defaultdict
from itertools import permutations,combinations
from decimal import Decimal,ROUND_HALF_UP
#tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
from functools import lru_cache, reduce
#@lru_cache(maxsize=None)
from operator import add,sub,mul,xor,and_,or_,itemgetter
INF = 10**18
mod1 = 10**9+7
mod2 = 998244353
#DecimalならPython
'''
'''
K = int(input())
dp = [0]*(K+7)
for i in reversed(range(K)):
for j in range(1,7):
dp[i] += (dp[i+j]+1)/6
print(dp[0])
if __name__ == '__main__':
main()
buey_t