很简单的一道题,计算勾股数(100以内)
要求去除重复的勾股数 比如 3 4 5 和4 3 5 这算一组测试案例输出:
程序代码:
3 ^2 + 4 ^2 = 5 ^2 5 ^2 + 12 ^2 = 13 ^2 6 ^2 + 8 ^2 = 10 ^2 7 ^2 + 24 ^2 = 25 ^2 8 ^2 + 15 ^2 = 17 ^2 9 ^2 + 12 ^2 = 15 ^2 9 ^2 + 40 ^2 = 41 ^2 10 ^2 + 24 ^2 = 26 ^2 11 ^2 + 60 ^2 = 61 ^2 12 ^2 + 16 ^2 = 20 ^2 12 ^2 + 35 ^2 = 37 ^2 13 ^2 + 84 ^2 = 85 ^2 14 ^2 + 48 ^2 = 50 ^2 15 ^2 + 36 ^2 = 39 ^2 16 ^2 + 30 ^2 = 34 ^2 16 ^2 + 63 ^2 = 65 ^2 18 ^2 + 24 ^2 = 30 ^2 18 ^2 + 80 ^2 = 82 ^2 20 ^2 + 21 ^2 = 29 ^2 20 ^2 + 48 ^2 = 52 ^2 21 ^2 + 28 ^2 = 35 ^2 21 ^2 + 72 ^2 = 75 ^2 24 ^2 + 32 ^2 = 40 ^2 24 ^2 + 45 ^2 = 51 ^2 24 ^2 + 70 ^2 = 74 ^2 27 ^2 + 36 ^2 = 45 ^2 28 ^2 + 45 ^2 = 53 ^2 30 ^2 + 72 ^2 = 78 ^2 32 ^2 + 60 ^2 = 68 ^2 33 ^2 + 44 ^2 = 55 ^2 35 ^2 + 84 ^2 = 91 ^2 36 ^2 + 48 ^2 = 60 ^2 39 ^2 + 80 ^2 = 89 ^2 40 ^2 + 42 ^2 = 58 ^2 42 ^2 + 56 ^2 = 70 ^2 48 ^2 + 55 ^2 = 73 ^2 48 ^2 + 64 ^2 = 80 ^2 54 ^2 + 72 ^2 = 90 ^2 57 ^2 + 76 ^2 = 95 ^2 60 ^2 + 63 ^2 = 87 ^2 65 ^2 + 72 ^2 = 97 ^2