-
-
Save okumurakengo/03a9385ff7aa82b80771dd37832318f1 to your computer and use it in GitHub Desktop.
誕生日のパラドックス
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 math | |
n = 30 # 30人の場合 | |
print(1 - (math.factorial(365) / (math.factorial(365 - n) * (365 ** n)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment