|
じゃんけんで勝負がつく確率
INPUT PROMPT "人数:":N
DO
IF R<20 THEN
LET R=R+1
ELSEIF R<200 THEN
LET R=R+10
ELSEIF R<2000 THEN
LET R=R+100
ELSEIF R<20000 THEN
LET R=R+1000
ELSEIF R<200000 THEN
LET R=R+10000
ELSE
LET R=R+100000
END IF
LET P=1-((3^(N-1)-2^N+2)/(3^(N-1)))^R
PRINT R;"回目";P*100;"%"
LOOP UNTIL P>.99
END
|
|