Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(THIS IS IN C LANGUAGE) 4.27 (Pythagorean Triples) A right triangle can have sid

ID: 3751007 • Letter: #

Question

(THIS IS IN C LANGUAGE)

4.27 (Pythagorean Triples) A right triangle can have sides that are all integers. The set of three
integer values for the sides of a right triangle is called a Pythagorean triple. These three sides must
satisfy the relationship that the sum of the squares of two of the sides is equal to the square of the
hypotenuse. Find all Pythagorean triples for side1, side2, and the hypotenuse all no larger than 500.
Use a triple-nested for loop that simply tries all possibilities. This is an example of brute-force
computing. Its not aesthetically pleasing to many people. But there are many reasons why these
techniques are important. First, with computing power increasing at such a phenomenal pace, so-
lutions that would have taken years or even centuries of computer time to produce with the tech-
nology of just a few years ago can now be produced in hours, minutes or even seconds. Recent
microprocessor chips can process a billion instructions per second! Second, as youll learn in more
advanced computer science courses, there are large numbers of interesting problems for which
theres no known algorithmic approach other than sheer brute force. We investigate many kinds of
problem-solving methodologies in this book. Well consider many brute-force approaches to vari-
ous interesting problems.

(3,·4,·5):·9·+·16·=·25 (4,·3,·5):·16·+·9·=·25 (5,·12,·13):·25·+·144·=·169 (6,·8,·10):·36·+·64·=·100 (7,·24,·25):·49·+·576·=·625 (8,·6,·10):·64·+·36·=·100 (8,·15,·17):·64·+·225·=·289 (9,·12,·15):·81·+·144·=·225 (9,·40,·41):·81·+·1600·=·1681 (10,·24,·26):·100·+·576·=·676 (11,·60,·61):·121·+·3600·=·3721 (12,·5,·13):·144·+·25·=·169 (12,·9,·15):·144·+·81·=·225 (12,·16,·20):·144·+·256·=·400 (12,·35,·37):·144·+·1225·=·1369 (13,·84,·85):·169·+·7056·=·7225 (14,·48,·50):·196·+·2304·=·2500 (15,·8,·17):·225·+·64·=·289 (15,·20,·25):·225·+·400·=·625 (15,·36,·39):·225·+·1296·=·1521 (15,·112,·113):·225·+·12544·=·12769 (16,·12,·20):·256·+·144·=·400 (16,·30,·34):·256·+·900·=·1156 (16,·63,·65):·256·+·3969·=·4225 (17,·144,·145):·289·+·20736·=·21025 (18,·24,·30):·324·+·576·=·900 (18,·80,·82):·324·+·6400·=·6724 (19,·180,·181):·361·+·32400·=·32761 (20,·15,·25):·400·+·225·=·625 (20,·21,·29):·400·+·441·=·841 (20,·48,·52):·400·+·2304·=·2704 (20,·99,·101):·400·+·9801·=·10201 (21,·20,·29):·441·+·400·=·841 (21,·28,·35):·441·+·784·=·1225 (21,·72,·75):·441·+·5184·=·5625 (21,·220,·221):·441·+·48400·=·48841 (22,·120,·122):·484·+·14400·=·14884 (23,·264,·265):·529·+·69696·=·70225 (24,·7,·25):·576·+·49·=·625 (24,·10,·26):·576·+·100·=·676 (24,·18,·30):·576·+·324·=·900 (24,·32,·40):·576·+·1024·=·1600 (24,·45,·51):·576·+·2025·=·2601 (24,·70,·74):·576·+·4900·=·5476 (24,·143,·145):·576·+·20449·=·21025 (25,·60,·65):·625·+·3600·=·4225 (25,·312,·313):·625·+·97344·=·97969 (26,·168,·170):·676·+·28224·=·28900 (27,·36,·45):·729·+·1296·=·2025 (27,·120,·123):·729·+·14400·=·15129 (27,·364,·365):·729·+·132496·=·133225 (28,·21,·35):·784·+·441·=·1225 (28,·45,·53):·784·+·2025·=·2809 (28,·96,·100):·784·+·9216·=·10000 (28,·195,·197):·784·+·38025·=·38809 (29,·420,·421):·841·+·176400·=·177241 (30,·16,·34):·900·+·256·=·1156 (30,·40,·50):·900·+·1600·=·2500 (30,·72,·78):·900·+·5184·=·6084 (30,·224,·226):·900·+·50176·=·51076 (31,·480,·481):·961·+·230400·=·231361 (32,·24,·40):·1024·+·576·=·1600 (32,·60,·68):·1024·+·3600·=·4624 (32,·126,·130):·1024·+·15876·=·16900 (32,·255,·257):·1024·+·65025·=·66049 (33,·44,·55):·1089·+·1936·=·3025 (33,·56,·65):·1089·+·3136·=·4225 (33,·180,·183):·1089·+·32400·=·33489 (34,·288,·290):·1156·+·82944·=·84100 (35,·12,·37):·1225·+·144·=·1369 (35,·84,·91):·1225·+·7056·=·8281 (35,·120,·125):·1225·+·14400·=·15625 (36,·15,·39):·1296·+·225·=·1521 (36,·27,·45):·1296·+·729·=·2025 (36,·48,·60):·1296·+·2304·=·3600 (36,·77,·85):·1296·+·5929·=·7225 (36,·105,·111):·1296·+·11025·=·12321 (36,·160,·164):·1296·+·25600·=·26896 (36,·323,·325):·1296·+·104329·=·105625 (38,·360,·362):·1444·+·129600·=·131044 (39,·52,·65):·1521·+·2704·=·4225 (39,·80,·89):·1521·+·6400·=·7921 (39,·252,·255):·1521·+·63504·=·65025 (40,·9,·41):·1600·+·81·=·1681 (40,·30,·50):·1600·+·900·=·2500 (40,·42,·58):·1600·+·1764·=·3364 (40,·75,·85):·1600·+·5625·=·7225 (40,·96,·104):·1600·+·9216·=·10816 (40,·198,·202):·1600·+·39204·=·40804 (40,·399,·401):·1600·+·159201·=·160801 (42,·40,·58):·1764·+·1600·=·3364 (42,·56,·70):·1764·+·3136·=·4900 (42,·144,·150):·1764·+·20736·=·22500 (42,·440,·442):·1764·+·193600·=·195364 (44,·33,·55):·1936·+·1089·=·3025 (44,·117,·125):·1936·+·13689·=·15625 (44,·240,·244):·1936·+·57600·=·59536 (44,·483,·485):·1936·+·233289·=·235225 (45,·24,·51):·2025·+·576·=·2601 (45,·28,·53):·2025·+·784·=·2809 (45,·60,·75):·2025·+·3600·=·5625 (45,·108,·117):·2025·+·11664·=·13689 (45,·200,·205):·2025·+·40000·=·42025 (45,·336,·339):·2025·+·112896·=·114921 (48,·14,·50):·2304·+·196·=·2500 (48,·20,·52):·2304·+·400·=·2704 (48,·36,·60):·2304·+·1296·=·3600 (48,·55,·73):·2304·+·3025·=·5329 (48,·64,·80):·2304·+·4096·=·6400 (48,·90,·102):·2304·+·8100·=·10404 (48,·140,·148):·2304·+·19600·=·21904 (48,·189,·195):·2304·+·35721·=·38025 (48,·286,·290):·2304·+·81796·=·84100 (49,·168,·175):·2401·+·28224·=·30625 (50,·120,·130):·2500·+·14400·=·16900 (51,·68,·85):·2601·+·4624·=·7225 (51,·140,·149):·2601·+·19600·=·22201 (51,·432,·435):·2601·+·186624·=·189225 (52,·39,·65):·2704·+·1521·=·4225 (52,·165,·173):·2704·+·27225·=·29929 (52,·336,·340):·2704·+·112896·=·115600 (54,·72,·90):·2916·+·5184·=·8100 (54,·240,·246):·2916·+·57600·=·60516 (55,·48,·73):·3025·+·2304·=·5329 (55,·132,·143):·3025·+·17424·=·20449 (55,·300,·305):·3025·+·90000·=·93025 (56,·33,·65):·3136·+·1089·=·4225 (56,·42,·70):·3136·+·1764·=·4900 (56,·90,·106):·3136·+·8100·=·11236 (56,·105,·119):·3136·+·11025·=·14161 (56,·192,·200):·3136·+·36864·=·40000 (56,·390,·394):·3136·+·152100·=·155236 (57,·76,·95):·3249·+·5776·=·9025 (57,·176,·185):·3249·+·30976·=·34225 (60,·11,·61):·3600·+·121·=·3721 (60,·25,·65):·3600·+·625·=·4225 (60,·32,·68):·3600·+·1024·=·4624 (60,·45,·75):·3600·+·2025·=·5625 (60,·63,·87):·3600·+·3969·=·7569 (60,·80,·100):·3600·+·6400·=·10000 (60,·91,·109):·3600·+·8281·=·11881 (60,·144,·156):·3600·+·20736·=·24336 (60,·175,·185):·3600·+·30625·=·34225 (60,·221,·229):·3600·+·48841·=·52441 (60,·297,·303):·3600·+·88209·=·91809 (60,·448,·452):·3600·+·200704·=·204304 (63,·16,·65):·3969·+·256·=·4225 (63,·60,·87):·3969·+·3600·=·7569 (63,·84,·105):·3969·+·7056·=·11025 (63,·216,·225):·3969·+·46656·=·50625 (63,·280,·287):·3969·+·78400·=·82369 (64,·48,·80):·4096·+·2304·=·6400 (64,·120,·136):·4096·+·14400·=·18496 (64,·252,·260):·4096·+·63504·=·67600 (65,·72,·97):·4225·+·5184·=·9409 (65,·156,·169):·4225·+·24336·=·28561 (65,·420,·425):·4225·+·176400·=·180625 (66,·88,·110):·4356·+·7744·=·12100 (66,·112,·130):·4356·+·12544·=·16900 (66,·360,·366):·4356·+·129600·=·133956 (68,·51,·85):·4624·+·2601·=·7225 (68,·285,·293):·4624·+·81225·=·85849 (69,·92,·115):·4761·+·8464·=·13225 (69,·260,·269):·4761·+·67600·=·72361 (70,·24,·74):·4900·+·576·=·5476 (70,·168,·182):·4900·+·28224·=·33124 (70,·240,·250):·4900·+·57600·=·62500 (72,·21,·75):·5184·+·441·=·5625 (72,·30,·78):·5184·+·900·=·6084 (72,·54,·90):·5184·+·2916·=·8100 (72,·65,·97):·5184·+·4225·=·9409 (72,·96,·120):·5184·+·9216·=·14400 (72,·135,·153):·5184·+·18225·=·23409 (72,·154,·170):·5184·+·23716·=·28900 (72,·210,·222):·5184·+·44100·=·49284 (72,·320,·328):·5184·+·102400·=·107584 (72,·429,·435):·5184·+·184041·=·189225 (75,·40,·85):·5625·+·1600·=·7225 (75,·100,·125):·5625·+·10000·=·15625 (75,·180,·195):·5625·+·32400·=·38025 (75,·308,·317):·5625·+·94864·=·100489 (76,·57,·95):·5776·+·3249·=·9025 (76,·357,·365):·5776·+·127449·=·133225 (77,·36,·85):·5929·+·1296·=·7225 (77,·264,·275):·5929·+·69696·=·75625 (77,·420,·427):·5929·+·176400·=·182329 (78,·104,·130):·6084·+·10816·=·16900 (78,·160,·178):·6084·+·25600·=·31684 (80,·18,·82):·6400·+·324·=·6724 (80,·39,·89):·6400·+·1521·=·7921 (80,·60,·100):·6400·+·3600·=·10000 (80,·84,·116):·6400·+·7056·=·13456 (80,·150,·170):·6400·+·22500·=·28900 (80,·192,·208):·6400·+·36864·=·43264 (80,·315,·325):·6400·+·99225·=·105625 (80,·396,·404):·6400·+·156816·=·163216 (81,·108,·135):·6561·+·11664·=·18225 (81,·360,·369):·6561·+·129600·=·136161 (84,·13,·85):·7056·+·169·=·7225 (84,·35,·91):·7056·+·1225·=·8281 (84,·63,·105):·7056·+·3969·=·11025 (84,·80,·116):·7056·+·6400·=·13456 (84,·112,·140):·7056·+·12544·=·19600 (84,·135,·159):·7056·+·18225·=·25281 (84,·187,·205):·7056·+·34969·=·42025 (84,·245,·259):·7056·+·60025·=·67081 (84,·288,·300):·7056·+·82944·=·90000 (84,·437,·445):·7056·+·190969·=·198025 (85,·132,·157):·7225·+·17424·=·24649 (85,·204,·221):·7225·+·41616·=·48841 (87,·116,·145):·7569·+·13456·=·21025 (87,·416,·425):·7569·+·173056·=·180625 (88,·66,·110):·7744·+·4356·=·12100 (88,·105,·137):·7744·+·11025·=·18769 (88,·165,·187):·7744·+·27225·=·34969 (88,·234,·250):·7744·+·54756·=·62500 (88,·480,·488):·7744·+·230400·=·238144 (90,·48,·102):·8100·+·2304·=·10404 (90,·56,·106):·8100·+·3136·=·11236 (90,·120,·150):·8100·+·14400·=·22500 (90,·216,·234):·8100·+·46656·=·54756 (90,·400,·410):·8100·+·160000·=·168100 (91,·60,·109):·8281·+·3600·=·11881 (91,·312,·325):·8281·+·97344·=·105625 (92,·69,·115):·8464·+·4761·=·13225 (93,·124,·155):·8649·+·15376·=·24025 (93,·476,·485):·8649·+·226576·=·235225 (95,·168,·193):·9025·+·28224·=·37249 (95,·228,·247):·9025·+·51984·=·61009 (96,·28,·100):·9216·+·784·=·10000 (96,·40,·104):·9216·+·1600·=·10816 (96,·72,·120):·9216·+·5184·=·14400 (96,·110,·146):·9216·+·12100·=·21316 (96,·128,·160):·9216·+·16384·=·25600 (96,·180,·204):·9216·+·32400·=·41616 (96,·247,·265):·9216·+·61009·=·70225 (96,·280,·296):·9216·+·78400·=·87616 (96,·378,·390):·9216·+·142884·=·152100 (98,·336,·350):·9604·+·112896·=·122500 (99,·20,·101):·9801·+·400·=·10201 (99,·132,·165):·9801·+·17424·=·27225 (99,·168,·195):·9801·+·28224·=·38025 (99,·440,·451):·9801·+·193600·=·203401 (100,·75,·125):·10000·+·5625·=·15625 (100,·105,·145):·10000·+·11025·=·21025 (100,·240,·260):·10000·+·57600·=·67600 (102,·136,·170):·10404·+·18496·=·28900 (102,·280,·298):·10404·+·78400·=·88804 (104,·78,·130):·10816·+·6084·=·16900 (104,·153,·185):·10816·+·23409·=·34225 (104,·195,·221):·10816·+·38025·=·48841 (104,·330,·346):·10816·+·108900·=·119716 (105,·36,·111):·11025·+·1296·=·12321 (105,·56,·119):·11025·+·3136·=·14161 (105,·88,·137):·11025·+·7744·=·18769 (105,·100,·145):·11025·+·10000·=·21025 (105,·140,·175):·11025·+·19600·=·30625 (105,·208,·233):·11025·+·43264·=·54289 (105,·252,·273):·11025·+·63504·=·74529 (105,·360,·375):·11025·+·129600·=·140625 (108,·45,·117):·11664·+·2025·=·13689 (108,·81,·135):·11664·+·6561·=·18225 (108,·144,·180):·11664·+·20736·=·32400 (108,·231,·255):·11664·+·53361·=·65025 (108,·315,·333):·11664·+·99225·=·110889 (108,·480,·492):·11664·+·230400·=·242064 (110,·96,·146):·12100·+·9216·=·21316 (110,·264,·286):·12100·+·69696·=·81796 (111,·148,·185):·12321·+·21904·=·34225 (112,·15,·113):·12544·+·225·=·12769 (112,·66,·130):·12544·+·4356·=·16900 (112,·84,·140):·12544·+·7056·=·19600 (112,·180,·212):·12544·+·32400·=·44944 (112,·210,·238):·12544·+·44100·=·56644 (112,·384,·400):·12544·+·147456·=·160000 (112,·441,·455):·12544·+·194481·=·207025 (114,·152,·190):·12996·+·23104·=·36100 (114,·352,·370):·12996·+·123904·=·136900 (115,·252,·277):·13225·+·63504·=·76729 (115,·276,·299):·13225·+·76176·=·89401 (116,·87,·145):·13456·+·7569·=·21025 (117,·44,·125):·13689·+·1936·=·15625 (117,·156,·195):·13689·+·24336·=·38025 (117,·240,·267):·13689·+·57600·=·71289 (119,·120,·169):·14161·+·14400·=·28561 (119,·408,·425):·14161·+·166464·=·180625 (120,·22,·122):·14400·+·484·=·14884 (120,·27,·123):·14400·+·729·=·15129 (120,·35,·125):·14400·+·1225·=·15625 (120,·50,·130):·14400·+·2500·=·16900 (120,·64,·136):·14400·+·4096·=·18496 (120,·90,·150):·14400·+·8100·=·22500 (120,·119,·169):·14400·+·14161·=·28561 (120,·126,·174):·14400·+·15876·=·30276 (120,·160,·200):·14400·+·25600·=·40000 (120,·182,·218):·14400·+·33124·=·47524 (120,·209,·241):·14400·+·43681·=·58081 (120,·225,·255):·14400·+·50625·=·65025 (120,·288,·312):·14400·+·82944·=·97344 (120,·350,·370):·14400·+·122500·=·136900 (120,·391,·409):·14400·+·152881·=·167281 (120,·442,·458):·14400·+·195364·=·209764 (123,·164,·205):·15129·+·26896·=·42025 (124,·93,·155):·15376·+·8649·=·24025 (125,·300,·325):·15625·+·90000·=·105625 (126,·32,·130):·15876·+·1024·=·16900 (126,·120,·174):·15876·+·14400·=·30276 (126,·168,·210):·15876·+·28224·=·44100 (126,·432,·450):·15876·+·186624·=·202500 (128,·96,·160):·16384·+·9216·=·25600 (128,·240,·272):·16384·+·57600·=·73984 (129,·172,·215):·16641·+·29584·=·46225 (130,·144,·194):·16900·+·20736·=·37636 (130,·312,·338):·16900·+·97344·=·114244 (132,·55,·143):·17424·+·3025·=·20449 (132,·85,·157):·17424·+·7225·=·24649 (132,·99,·165):·17424·+·9801·=·27225 (132,·176,·220):·17424·+·30976·=·48400 (132,·224,·260):·17424·+·50176·=·67600 (132,·351,·375):·17424·+·123201·=·140625 (132,·385,·407):·17424·+·148225·=·165649 (132,·475,·493):·17424·+·225625·=·243049 (133,·156,·205):·17689·+·24336·=·42025 (133,·456,·475):·17689·+·207936·=·225625 (135,·72,·153):·18225·+·5184·=·23409 (135,·84,·159):·18225·+·7056·=·25281 (135,·180,·225):·18225·+·32400·=·50625 (135,·324,·351):·18225·+·104976·=·123201 (135,·352,·377):·18225·+·123904·=·142129 (136,·102,·170):·18496·+·10404·=·28900 (136,·255,·289):·18496·+·65025·=·83521 (136,·273,·305):·18496·+·74529·=·93025 (138,·184,·230):·19044·+·33856·=·52900 (140,·48,·148):·19600·+·2304·=·21904 (140,·51,·149):·19600·+·2601·=·22201 (140,·105,·175):·19600·+·11025·=·30625 (140,·147,·203):·19600·+·21609·=·41209 (140,·171,·221):·19600·+·29241·=·48841 (140,·225,·265):·19600·+·50625·=·70225 (140,·336,·364):·19600·+·112896·=·132496 (140,·480,·500):·19600·+·230400·=·250000 (141,·188,·235):·19881·+·35344·=·55225 (143,·24,·145):·20449·+·576·=·21025 (144,·17,·145):·20736·+·289·=·21025 (144,·42,·150):·20736·+·1764·=·22500 (144,·60,·156):·20736·+·3600·=·24336 (144,·108,·180):·20736·+·11664·=·32400 (144,·130,·194):·20736·+·16900·=·37636 (144,·165,·219):·20736·+·27225·=·47961 (144,·192,·240):·20736·+·36864·=·57600 (144,·270,·306):·20736·+·72900·=·93636 (144,·308,·340):·20736·+·94864·=·115600 (144,·420,·444):·20736·+·176400·=·197136 (145,·348,·377):·21025·+·121104·=·142129 (145,·408,·433):·21025·+·166464·=·187489 (147,·140,·203):·21609·+·19600·=·41209 (147,·196,·245):·21609·+·38416·=·60025 (148,·111,·185):·21904·+·12321·=·34225 (150,·80,·170):·22500·+·6400·=·28900 (150,·200,·250):·22500·+·40000·=·62500 (150,·360,·390):·22500·+·129600·=·152100 (152,·114,·190):·23104·+·12996·=·36100 (152,·285,·323):·23104·+·81225·=·104329 (152,·345,·377):·23104·+·119025·=·142129 (153,·104,·185):·23409·+·10816·=·34225 (153,·204,·255):·23409·+·41616·=·65025 (153,·420,·447):·23409·+·176400·=·199809 (154,·72,·170):·23716·+·5184·=·28900 (155,·372,·403):·24025·+·138384·=·162409 (155,·468,·493):·24025·+·219024·=·243049 (156,·65,·169):·24336·+·4225·=·28561 (156,·117,·195):·24336·+·13689·=·38025 (156,·133,·205):·24336·+·17689·=·42025 (156,·208,·260):·24336·+·43264·=·67600 (156,·320,·356):·24336·+·102400·=·126736 (156,·455,·481):·24336·+·207025·=·231361 (159,·212,·265):·25281·+·44944·=·70225 (160,·36,·164):·25600·+·1296·=·26896 (160,·78,·178):·25600·+·6084·=·31684 (160,·120,·200):·25600·+·14400·=·40000 (160,·168,·232):·25600·+·28224·=·53824 (160,·231,·281):·25600·+·53361·=·78961 (160,·300,·340):·25600·+·90000·=·115600 (160,·384,·416):·25600·+·147456·=·173056 (161,·240,·289):·25921·+·57600·=·83521 (162,·216,·270):·26244·+·46656·=·72900 (164,·123,·205):·26896·+·15129·=·42025 (165,·52,·173):·27225·+·2704·=·29929 (165,·88,·187):·27225·+·7744·=·34969 (165,·144,·219):·27225·+·20736·=·47961 (165,·220,·275):·27225·+·48400·=·75625 (165,·280,·325):·27225·+·78400·=·105625 (165,·396,·429):·27225·+·156816·=·184041 (168,·26,·170):·28224·+·676·=·28900 (168,·49,·175):·28224·+·2401·=·30625 (168,·70,·182):·28224·+·4900·=·33124 (168,·95,·193):·28224·+·9025·=·37249 (168,·99,·195):·28224·+·9801·=·38025 (168,·126,·210):·28224·+·15876·=·44100 (168,·160,·232):·28224·+·25600·=·53824 (168,·224,·280):·28224·+·50176·=·78400 (168,·270,·318):·28224·+·72900·=·101124 (168,·315,·357):·28224·+·99225·=·127449 (168,·374,·410):·28224·+·139876·=·168100 (168,·425,·457):·28224·+·180625·=·208849 (170,·264,·314):·28900·+·69696·=·98596 (170,·408,·442):·28900·+·166464·=·195364 (171,·140,·221):·29241·+·19600·=·48841 (171,·228,·285):·29241·+·51984·=·81225 (172,·129,·215):·29584·+·16641·=·46225 (174,·232,·290):·30276·+·53824·=·84100 (175,·60,·185):·30625·+·3600·=·34225 (175,·288,·337):·30625·+·82944·=·113569 (175,·420,·455):·30625·+·176400·=·207025 (176,·57,·185):·30976·+·3249·=·34225 (176,·132,·220):·30976·+·17424·=·48400 (176,·210,·274):·30976·+·44100·=·75076 (176,·330,·374):·30976·+·108900·=·139876 (176,·468,·500):·30976·+·219024·=·250000 (177,·236,·295):·31329·+·55696·=·87025 (180,·19,·181):·32400·+·361·=·32761 (180,·33,·183):·32400·+·1089·=·33489 (180,·75,·195):·32400·+·5625·=·38025 (180,·96,·204):·32400·+·9216·=·41616 (180,·112,·212):·32400·+·12544·=·44944 (180,·135,·225):·32400·+·18225·=·50625 (180,·189,·261):·32400·+·35721·=·68121 (180,·240,·300):·32400·+·57600·=·90000 (180,·273,·327):·32400·+·74529·=·106929 (180,·299,·349):·32400·+·89401·=·121801 (180,·385,·425):·32400·+·148225·=·180625 (180,·432,·468):·32400·+·186624·=·219024 (182,·120,·218):·33124·+·14400·=·47524 (183,·244,·305):·33489·+·59536·=·93025 (184,·138,·230):·33856·+·19044·=·52900 (184,·345,·391):·33856·+·119025·=·152881 (185,·444,·481):·34225·+·197136·=·231361 (186,·248,·310):·34596·+·61504·=·96100 (187,·84,·205):·34969·+·7056·=·42025 (188,·141,·235):·35344·+·19881·=·55225 (189,·48,·195):·35721·+·2304·=·38025 (189,·180,·261):·35721·+·32400·=·68121 (189,·252,·315):·35721·+·63504·=·99225 (189,·340,·389):·35721·+·115600·=·151321 (190,·336,·386):·36100·+·112896·=·148996 (190,·456,·494):·36100·+·207936·=·244036 (192,·56,·200):·36864·+·3136·=·40000 (192,·80,·208):·36864·+·6400·=·43264 (192,·144,·240):·36864·+·20736·=·57600 (192,·220,·292):·36864·+·48400·=·85264 (192,·256,·320):·36864·+·65536·=·102400 (192,·360,·408):·36864·+·129600·=·166464 (195,·28,·197):·38025·+·784·=·38809 (195,·104,·221):·38025·+·10816·=·48841 (195,·216,·291):·38025·+·46656·=·84681 (195,·260,·325):·38025·+·67600·=·105625 (195,·400,·445):·38025·+·160000·=·198025 (196,·147,·245):·38416·+·21609·=·60025 (196,·315,·371):·38416·+·99225·=·137641 (198,·40,·202):·39204·+·1600·=·40804 (198,·264,·330):·39204·+·69696·=·108900 (198,·336,·390):·39204·+·112896·=·152100 (200,·45,·205):·40000·+·2025·=·42025 (200,·150,·250):·40000·+·22500·=·62500 (200,·210,·290):·40000·+·44100·=·84100 (200,·375,·425):·40000·+·140625·=·180625 (201,·268,·335):·40401·+·71824·=·112225 (203,·396,·445):·41209·+·156816·=·198025 (204,·85,·221):·41616·+·7225·=·48841 (204,·153,·255):·41616·+·23409·=·65025 (204,·253,·325):·41616·+·64009·=·105625 (204,·272,·340):·41616·+·73984·=·115600 (207,·224,·305):·42849·+·50176·=·93025 (207,·276,·345):·42849·+·76176·=·119025 (208,·105,·233):·43264·+·11025·=·54289 (208,·156,·260):·43264·+·24336·=·67600 (208,·306,·370):·43264·+·93636·=·136900 (208,·390,·442):·43264·+·152100·=·195364 (209,·120,·241):·43681·+·14400·=·58081 (210,·72,·222):·44100·+·5184·=·49284 (210,·112,·238):·44100·+·12544·=·56644 (210,·176,·274):·44100·+·30976·=·75076 (210,·200,·290):·44100·+·40000·=·84100 (210,·280,·350):·44100·+·78400·=·122500 (210,·416,·466):·44100·+·173056·=·217156 (212,·159,·265):·44944·+·25281·=·70225 (213,·284,·355):·45369·+·80656·=·126025 (216,·63,·225):·46656·+·3969·=·50625 (216,·90,·234):·46656·+·8100·=·54756 (216,·162,·270):·46656·+·26244·=·72900 (216,·195,·291):·46656·+·38025·=·84681 (216,·288,·360):·46656·+·82944·=·129600 (216,·405,·459):·46656·+·164025·=·210681 (219,·292,·365):·47961·+·85264·=·133225 (220,·21,·221):·48400·+·441·=·48841 (220,·165,·275):·48400·+·27225·=·75625 (220,·192,·292):·48400·+·36864·=·85264 (220,·231,·319):·48400·+·53361·=·101761 (221,·60,·229):·48841·+·3600·=·52441 (222,·296,·370):·49284·+·87616·=·136900 (224,·30,·226):·50176·+·900·=·51076 (224,·132,·260):·50176·+·17424·=·67600 (224,·168,·280):·50176·+·28224·=·78400 (224,·207,·305):·50176·+·42849·=·93025 (224,·360,·424):·50176·+·129600·=·179776 (224,·420,·476):·50176·+·176400·=·226576 (225,·120,·255):·50625·+·14400·=·65025 (225,·140,·265):·50625·+·19600·=·70225 (225,·272,·353):·50625·+·73984·=·124609 (225,·300,·375):·50625·+·90000·=·140625 (228,·95,·247):·51984·+·9025·=·61009 (228,·171,·285):·51984·+·29241·=·81225 (228,·304,·380):·51984·+·92416·=·144400 (228,·325,·397):·51984·+·105625·=·157609 (231,·108,·255):·53361·+·11664·=·65025 (231,·160,·281):·53361·+·25600·=·78961 (231,·220,·319):·53361·+·48400·=·101761 (231,·308,·385):·53361·+·94864·=·148225 (231,·392,·455):·53361·+·153664·=·207025 (232,·174,·290):·53824·+·30276·=·84100 (232,·435,·493):·53824·+·189225·=·243049 (234,·88,·250):·54756·+·7744·=·62500 (234,·312,·390):·54756·+·97344·=·152100 (236,·177,·295):·55696·+·31329·=·87025 (237,·316,·395):·56169·+·99856·=·156025 (238,·240,·338):·56644·+·57600·=·114244 (240,·44,·244):·57600·+·1936·=·59536 (240,·54,·246):·57600·+·2916·=·60516 (240,·70,·250):·57600·+·4900·=·62500 (240,·100,·260):·57600·+·10000·=·67600 (240,·117,·267):·57600·+·13689·=·71289 (240,·128,·272):·57600·+·16384·=·73984 (240,·161,·289):·57600·+·25921·=·83521 (240,·180,·300):·57600·+·32400·=·90000 (240,·238,·338):·57600·+·56644·=·114244 (240,·252,·348):·57600·+·63504·=·121104 (240,·275,·365):·57600·+·75625·=·133225 (240,·320,·400):·57600·+·102400·=·160000 (240,·364,·436):·57600·+·132496·=·190096 (240,·418,·482):·57600·+·174724·=·232324 (243,·324,·405):·59049·+·104976·=·164025 (244,·183,·305):·59536·+·33489·=·93025 (245,·84,·259):·60025·+·7056·=·67081 (246,·328,·410):·60516·+·107584·=·168100 (247,·96,·265):·61009·+·9216·=·70225 (248,·186,·310):·61504·+·34596·=·96100 (249,·332,·415):·62001·+·110224·=·172225 (252,·39,·255):·63504·+·1521·=·65025 (252,·64,·260):·63504·+·4096·=·67600 (252,·105,·273):·63504·+·11025·=·74529 (252,·115,·277):·63504·+·13225·=·76729 (252,·189,·315):·63504·+·35721·=·99225 (252,·240,·348):·63504·+·57600·=·121104 (252,·275,·373):·63504·+·75625·=·139129 (252,·336,·420):·63504·+·112896·=·176400 (252,·405,·477):·63504·+·164025·=·227529 (253,·204,·325):·64009·+·41616·=·105625 (255,·32,·257):·65025·+·1024·=·66049 (255,·136,·289):·65025·+·18496·=·83521 (255,·340,·425):·65025·+·115600·=·180625 (255,·396,·471):·65025·+·156816·=·221841 (256,·192,·320):·65536·+·36864·=·102400 (258,·344,·430):·66564·+·118336·=·184900 (260,·69,·269):·67600·+·4761·=·72361 (260,·195,·325):·67600·+·38025·=·105625 (260,·273,·377):·67600·+·74529·=·142129 (260,·288,·388):·67600·+·82944·=·150544 (261,·348,·435):·68121·+·121104·=·189225 (261,·380,·461):·68121·+·144400·=·212521 (264,·23,·265):·69696·+·529·=·70225 (264,·77,·275):·69696·+·5929·=·75625 (264,·110,·286):·69696·+·12100·=·81796 (264,·170,·314):·69696·+·28900·=·98596 (264,·198,·330):·69696·+·39204·=·108900 (264,·315,·411):·69696·+·99225·=·168921 (264,·352,·440):·69696·+·123904·=·193600 (266,·312,·410):·70756·+·97344·=·168100 (267,·356,·445):·71289·+·126736·=·198025 (268,·201,·335):·71824·+·40401·=·112225 (270,·144,·306):·72900·+·20736·=·93636 (270,·168,·318):·72900·+·28224·=·101124 (270,·360,·450):·72900·+·129600·=·202500 (272,·204,·340):·73984·+·41616·=·115600 (272,·225,·353):·73984·+·50625·=·124609 (273,·136,·305):·74529·+·18496·=·93025 (273,·180,·327):·74529·+·32400·=·106929 (273,·260,·377):·74529·+·67600·=·142129 (273,·364,·455):·74529·+·132496·=·207025 (275,·240,·365):·75625·+·57600·=·133225 (275,·252,·373):·75625·+·63504·=·139129 (276,·115,·299):·76176·+·13225·=·89401 (276,·207,·345):·76176·+·42849·=·119025 (276,·368,·460):·76176·+·135424·=·211600 (279,·372,·465):·77841·+·138384·=·216225 (280,·63,·287):·78400·+·3969·=·82369 (280,·96,·296):·78400·+·9216·=·87616 (280,·102,·298):·78400·+·10404·=·88804 (280,·165,·325):·78400·+·27225·=·105625 (280,·210,·350):·78400·+·44100·=·122500 (280,·294,·406):·78400·+·86436·=·164836 (280,·342,·442):·78400·+·116964·=·195364 (280,·351,·449):·78400·+·123201·=·201601 (282,·376,·470):·79524·+·141376·=·220900 (284,·213,·355):·80656·+·45369·=·126025 (285,·68,·293):·81225·+·4624·=·85849 (285,·152,·323):·81225·+·23104·=·104329 (285,·380,·475):·81225·+·144400·=·225625 (286,·48,·290):·81796·+·2304·=·84100 (288,·34,·290):·82944·+·1156·=·84100 (288,·84,·300):·82944·+·7056·=·90000 (288,·120,·312):·82944·+·14400·=·97344 (288,·175,·337):·82944·+·30625·=·113569 (288,·216,·360):·82944·+·46656·=·129600 (288,·260,·388):·82944·+·67600·=·150544 (288,·330,·438):·82944·+·108900·=·191844 (288,·384,·480):·82944·+·147456·=·230400 (291,·388,·485):·84681·+·150544·=·235225 (292,·219,·365):·85264·+·47961·=·133225 (294,·280,·406):·86436·+·78400·=·164836 (294,·392,·490):·86436·+·153664·=·240100 (296,·222,·370):·87616·+·49284·=·136900 (297,·60,·303):·88209·+·3600·=·91809 (297,·304,·425):·88209·+·92416·=·180625 (297,·396,·495):·88209·+·156816·=·245025 (299,·180,·349):·89401·+·32400·=·121801 (300,·55,·305):·90000·+·3025·=·93025 (300,·125,·325):·90000·+·15625·=·105625 (300,·160,·340):·90000·+·25600·=·115600 (300,·225,·375):·90000·+·50625·=·140625 (300,·315,·435):·90000·+·99225·=·189225 (300,·400,·500):·90000·+·160000·=·250000 (304,·228,·380):·92416·+·51984·=·144400 (304,·297,·425):·92416·+·88209·=·180625 (306,·208,·370):·93636·+·43264·=·136900 (308,·75,·317):·94864·+·5625·=·100489 (308,·144,·340):·94864·+·20736·=·115600 (308,·231,·385):·94864·+·53361·=·148225 (312,·25,·313):·97344·+·625·=·97969 (312,·91,·325):·97344·+·8281·=·105625 (312,·130,·338):·97344·+·16900·=·114244 (312,·234,·390):·97344·+·54756·=·152100 (312,·266,·410):·97344·+·70756·=·168100 (315,·80,·325):·99225·+·6400·=·105625 (315,·108,·333):·99225·+·11664·=·110889 (315,·168,·357):·99225·+·28224·=·127449 (315,·196,·371):·99225·+·38416·=·137641 (315,·264,·411):·99225·+·69696·=·168921 (315,·300,·435):·99225·+·90000·=·189225 (316,·237,·395):·99856·+·56169·=·156025 (319,·360,·481):·101761·+·129600·=·231361 (320,·72,·328):·102400·+·5184·=·107584 (320,·156,·356):·102400·+·24336·=·126736 (320,·240,·400):·102400·+·57600·=·160000 (320,·336,·464):·102400·+·112896·=·215296 (323,·36,·325):·104329·+·1296·=·105625 (324,·135,·351):·104976·+·18225·=·123201 (324,·243,·405):·104976·+·59049·=·164025 (325,·228,·397):·105625·+·51984·=·157609 (325,·360,·485):·105625·+·129600·=·235225 (328,·246,·410):·107584·+·60516·=·168100 (330,·104,·346):·108900·+·10816·=·119716 (330,·176,·374):·108900·+·30976·=·139876 (330,·288,·438):·108900·+·82944·=·191844 (332,·249,·415):·110224·+·62001·=·172225 (336,·45,·339):·112896·+·2025·=·114921 (336,·52,·340):·112896·+·2704·=·115600 (336,·98,·350):·112896·+·9604·=·122500 (336,·140,·364):·112896·+·19600·=·132496 (336,·190,·386):·112896·+·36100·=·148996 (336,·198,·390):·112896·+·39204·=·152100 (336,·252,·420):·112896·+·63504·=·176400 (336,·320,·464):·112896·+·102400·=·215296 (340,·189,·389):·115600·+·35721·=·151321 (340,·255,·425):·115600·+·65025·=·180625 (340,·357,·493):·115600·+·127449·=·243049 (342,·280,·442):·116964·+·78400·=·195364 (344,·258,·430):·118336·+·66564·=·184900 (345,·152,·377):·119025·+·23104·=·142129 (345,·184,·391):·119025·+·33856·=·152881 (348,·145,·377):·121104·+·21025·=·142129 (348,·261,·435):·121104·+·68121·=·189225 (350,·120,·370):·122500·+·14400·=·136900 (351,·132,·375):·123201·+·17424·=·140625 (351,·280,·449):·123201·+·78400·=·201601 (352,·114,·370):·123904·+·12996·=·136900 (352,·135,·377):·123904·+·18225·=·142129 (352,·264,·440):·123904·+·69696·=·193600 (356,·267,·445):·126736·+·71289·=·198025 (357,·76,·365):·127449·+·5776·=·133225 (357,·340,·493):·127449·+·115600·=·243049 (360,·38,·362):·129600·+·1444·=·131044 (360,·66,·366):·129600·+·4356·=·133956 (360,·81,·369):·129600·+·6561·=·136161 (360,·105,·375):·129600·+·11025·=·140625 (360,·150,·390):·129600·+·22500·=·152100 (360,·192,·408):·129600·+·36864·=·166464 (360,·224,·424):·129600·+·50176·=·179776 (360,·270,·450):·129600·+·72900·=·202500 (360,·319,·481):·129600·+·101761·=·231361 (360,·325,·485):·129600·+·105625·=·235225 (364,·27,·365):·132496·+·729·=·133225 (364,·240,·436):·132496·+·57600·=·190096 (364,·273,·455):·132496·+·74529·=·207025 (368,·276,·460):·135424·+·76176·=·211600 (372,·155,·403):·138384·+·24025·=·162409 (372,·279,·465):·138384·+·77841·=·216225 (374,·168,·410):·139876·+·28224·=·168100 (375,·200,·425):·140625·+·40000·=·180625 (376,·282,·470):·141376·+·79524·=·220900 (378,·96,·390):·142884·+·9216·=·152100 (380,·261,·461):·144400·+·68121·=·212521 (380,·285,·475):·144400·+·81225·=·225625 (384,·112,·400):·147456·+·12544·=·160000 (384,·160,·416):·147456·+·25600·=·173056 (384,·288,·480):·147456·+·82944·=·230400 (385,·132,·407):·148225·+·17424·=·165649 (385,·180,·425):·148225·+·32400·=·180625 (388,·291,·485):·150544·+·84681·=·235225 (390,·56,·394):·152100·+·3136·=·155236 (390,·208,·442):·152100·+·43264·=·195364 (391,·120,·409):·152881·+·14400·=·167281 (392,·231,·455):·153664·+·53361·=·207025 (392,·294,·490):·153664·+·86436·=·240100 (396,·80,·404):·156816·+·6400·=·163216 (396,·165,·429):·156816·+·27225·=·184041 (396,·203,·445):·156816·+·41209·=·198025 (396,·255,·471):·156816·+·65025·=·221841 (396,·297,·495):·156816·+·88209·=·245025 (399,·40,·401):·159201·+·1600·=·160801 (400,·90,·410):·160000·+·8100·=·168100 (400,·195,·445):·160000·+·38025·=·198025 (400,·300,·500):·160000·+·90000·=·250000 (405,·216,·459):·164025·+·46656·=·210681 (405,·252,·477):·164025·+·63504·=·227529 (408,·119,·425):·166464·+·14161·=·180625 (408,·145,·433):·166464·+·21025·=·187489 (408,·170,·442):·166464·+·28900·=·195364 (416,·87,·425):·173056·+·7569·=·180625 (416,·210,·466):·173056·+·44100·=·217156 (418,·240,·482):·174724·+·57600·=·232324 (420,·29,·421):·176400·+·841·=·177241 (420,·65,·425):·176400·+·4225·=·180625 (420,·77,·427):·176400·+·5929·=·182329 (420,·144,·444):·176400·+·20736·=·197136 (420,·153,·447):·176400·+·23409·=·199809 (420,·175,·455):·176400·+·30625·=·207025 (420,·224,·476):·176400·+·50176·=·226576 (425,·168,·457):·180625·+·28224·=·208849 (429,·72,·435):·184041·+·5184·=·189225 (432,·51,·435):·186624·+·2601·=·189225 (432,·126,·450):·186624·+·15876·=·202500 (432,·180,·468):·186624·+·32400·=·219024 (435,·232,·493):·189225·+·53824·=·243049 (437,·84,·445):·190969·+·7056·=·198025 (440,·42,·442):·193600·+·1764·=·195364 (440,·99,·451):·193600·+·9801·=·203401 (441,·112,·455):·194481·+·12544·=·207025 (442,·120,·458):·195364·+·14400·=·209764 (444,·185,·481):·197136·+·34225·=·231361 (448,·60,·452):·200704·+·3600·=·204304 (455,·156,·481):·207025·+·24336·=·231361 (456,·133,·475):·207936·+·17689·=·225625 (456,·190,·494):·207936·+·36100·=·244036 (468,·155,·493):·219024·+·24025·=·243049 (468,·176,·500):·219024·+·30976·=·250000 (475,·132,·493):·225625·+·17424·=·243049 (476,·93,·485):·226576·+·8649·=·235225 (480,·31,·481):·230400·+·961·=·231361 (480,·88,·488):·230400·+·7744·=·238144 (480,·108,·492):·230400·+·11664·=·242064 (480,·140,·500):·230400·+·19600·=·250000 (483,·44,·485):·233289·+·1936·=·235225

Explanation / Answer

You need three loop first will be for hypotenuse, and 2 inner loop will be to find all possible combination. #include int main() { for(int i=1;i