用python判程序改错:计算n!的值小于等于10000时n的最大值。n = 1while True s = n n += 1 if s 10000 break n += 1 print最大整数n为n-1使得n!=10000
修改后的程序:
s = 1 n = 1 while s <= 10000: s *= n n += 1 print("最大整数n为",n-2,'使得n!<=10000')
原文地址: https://www.cveoy.top/t/topic/bp6p 著作权归作者所有。请勿转载和采集!