begin = 1
while True:
if(begin % 15 == 0):print ('CCC')
elif(begin % 3 == 0):print ('BBB')
elif(begin % 5 == 0):print ('AAA')
else:
print(begin)
begin += 1
if(begin > 101): break;
据说有牛人写成了一行代码...
begin = 1
while True:
if(begin % 15 == 0):print ('CCC')
elif(begin % 3 == 0):print ('BBB')
elif(begin % 5 == 0):print ('AAA')
else:
print(begin)
begin += 1
if(begin > 101): break;
据说有牛人写成了一行代码...
转载于:https://www.cnblogs.com/xiaobaichuangtianxia/p/3761254.html