Python30以内的勾股数
时间: 2024-06-01 07:06:03 浏览: 102
求50以内的勾股数组
勾股数是指三个自然数a、b、c,满足a²+b²=c²,其中a、b、c互质(没有公共的因子)。Python30以内的勾股数有如下几组:
(3, 4, 5)
(5, 12, 13)
(6, 8, 10)
(7, 24, 25)
(8, 15, 17)
(9, 12, 15)
(9, 40, 41)
(10, 24, 26)
(11, 60, 61)
(12, 16, 20)
(12, 35, 37)
(13, 84, 85)
(14, 48, 50)
(15, 20, 25)
(15, 36, 39)
(16, 30, 34)
(16, 63, 65)
(18, 24, 30)
(18, 80, 82)
(20, 21, 29)
(20, 48, 52)
(21, 28, 35)
(21, 72, 75)
(24, 32, 40)
(24, 45, 51)
(24, 70, 74)
(25, 60, 65)
(27, 36, 45)
(28, 45, 53)
(30, 40, 50)
阅读全文