python编写程序输出50以内勾股数,如下图所示,要求每组显示六祖,各组...
python编写程序输出50以内勾股数,如下图所⽰,要求每组显⽰六祖,各组勾股数⽆重复import mathn = 0for a in range(1,49):for b in range(a,49):c = il(math.sqrt(a**2+b**2))if c<50 and c**2 == a**2 + b**2:if(n%6 == 0):print("%2d,%2d,%...
2023-12-02 11 0