x | E(x) |
---|---|
10 | 3.5264 |
20 | 4.812 |
30 | 5.5511 |
40 | 6.0917 |
50 | 6.558 |
60 | 6.8769 |
70 | 7.2235 |
80 | 7.4595 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest.FunSuite | |
import simulacrum.typeclass | |
import scala.language.higherKinds | |
class TypeClassTest extends FunSuite { | |
test("box!") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# モンテカルロ法で最大連勝数の期待値を出す | |
# x : 試合数 | |
# p : 勝率 | |
# n : モンテカルロを試行する回数 | |
import random | |
def get_max_continuous_true(lst): | |
"Boolean List を受け取り, Trueの最大連続数を返す" | |
cnt = 0 | |
max_cnt = 0 |