Skip to content

Instantly share code, notes, and snippets.

@martian17
Created January 25, 2020 04:58
Show Gist options
  • Save martian17/292ed4c2a199164922df0fd510fc0877 to your computer and use it in GitHub Desktop.
Save martian17/292ed4c2a199164922df0fd510fc0877 to your computer and use it in GitHub Desktop.
cnt = 0;
for i in range(1,7):
for j in range(1,7):
for k in range(1,7):
##(i,j,kがサイコロ3つの組み合わせだからこれが条件に合致してるかを見る)
sum = i+j+k
if(sum >12 and sum < 18):
cnt = cnt + 1
print(cnt)
## 55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment