用while循环写韩信点兵规则1000士兵以上并且士兵人数除以3余数为2除以5余数为4除以7余数为6显示输出韩信点兵的士兵人数。
count = 1000 while count <= 10000: if count % 3 == 2 and count % 5 == 4 and count % 7 == 6: print("韩信点兵:", count) count += 1
原文地址: https://www.cveoy.top/t/topic/cDoy 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
count = 1000 while count <= 10000: if count % 3 == 2 and count % 5 == 4 and count % 7 == 6: print("韩信点兵:", count) count += 1
原文地址: https://www.cveoy.top/t/topic/cDoy 著作权归作者所有。请勿转载和采集!