projecteuler---->problem=9----Special Pythagorean triplet
来源:互联网 发布:南京软件开发公司 编辑:程序博客网 时间:2024/05/24 11:14
title:
A Pythagorean triplet is a set of three natural numbers, a b c, for which,
a2 + b2 =c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for which a + b +c = 1000.
Find the product abc.
勾股数组就是三个自然数a, b, c:
a2 +b2 =c2 (a < b < c)
例如,32 + 42 = 9 + 16 = 25 = 52。
现存在唯一的勾股数组a, b, c,且a +b +c = 1000。请求出这三个数的乘积。
def resu():for i in range(1,1000):for j in range(1,1000):k=1000-i-jif i*i+j*j==k*k:print i*j*kreturnresu()
0 0
- projecteuler---->problem=9----Special Pythagorean triplet
- Problem 9:Special Pythagorean triplet
- Problem 9:Special Pythagorean triplet
- 【Project Euler】【Problem 9】Special Pythagorean triplet
- (Problem 9)Special Pythagorean triplet
- Project Euler: Problem 9 Special Pythagorean triplet
- Project Euler Problem 9: Special Pythagorean triplet
- Problem 9 Special Pythagorean triplet (毕达哥拉斯三元数组...)
- PE 9 Special Pythagorean triplet
- 9 Special Pythagorean triplet - Project Euler
- project euler 9 Special Pythagorean triplet
- 欧拉计划(9)Special Pythagorean triplet
- Project Euler 009 Special Pythagorean triplet
- 欧拉项目第九题 Special Pythagorean triplet
- Problem 9 of Pythagorean
- https://projecteuler.net/problem=9
- http://projecteuler.net/problem=9 [Answer:31875000]
- http://projecteuler.net/problem=9 【参考解法】
- realloc()函数的使用
- 函数对象(c++)
- 啤酒和饮料
- linux-6.5下 基于vsftpd+pam+mysql的配置解析
- 数据库中ResultSet的使用
- projecteuler---->problem=9----Special Pythagorean triplet
- 水题 刷烟大OJ--2514: 密码序列
- camera
- uva 439
- 干掉Gif图片
- 水题 刷烟大OJ--2515: 小明买蛋挞
- 对象引用与对象指针
- php正则表达式集锦
- eclipse下配置tomcat