如: 1 11 121 1331 14641 1 5 10 10 5 1
def panduan(num): sun = 0 if num==1 : print 1 for i in range(num): sun = sun+i if sun == num: print i+2 break elif sun >num: print i + 2 break