Created
May 5, 2016 04:35
-
-
Save yuda110/d2229b94acb4acce743d10fbe7b69e56 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
#p <= 1000 직각삼각형 | |
#a^2 + b^2 = c^2 | |
#1) p의 값을 기준으로, {a, b, c} 값을 정한다. | |
def get_삼각형의_세변(p): | |
직각삼각형_cnt = 0 | |
for a in range(어디부터, p-2까지): | |
for b in range(어디부터, p-2까지): | |
c = p - (a + b) | |
if a^2 + b^2 == c^2 : | |
직각삼각형_cnt += 1 | |
return 직각삼각형_cnt | |
#2) max값 구하기 | |
def get_max.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment