Python程序:能力拓展

版权声明: https://blog.csdn.net/qq_42333893/article/details/80696925
 #=====================================================
# ##########有 1,2,3,4,5,6,7,8,
# #########八个数字能做成多少互不相同且无重复的两位数
# count  = 0
# for i in  range(1 , 9):
#     for v in  range(1 , 9 ):
#         if i != v :
#             count += 1
# # count = count-8
# print(count)
#=====================================================
#  9 * 9  乘法表
# for  i in range(1,10):
#      string = ""
#      for j in range(1, i+1):
#          string +=str(j)+"*" + str(i) + "=" +str(i*j)+"\t"
#      print(string)
# count = 0
# while count < 100:
#
#     count = count + 1
#     print(count)
#
#=====================================================
# for i in range(10):
#     print(i)
# 公鸡5文钱一只,母鸡3文钱一只,小鸡钱三只1文钱,
# 用100文钱买一百只鸡,其中公鸡,母鸡,小鸡都必须要有,
# 问 公鸡,母鸡,小鸡要买多少只刚好凑足100文钱
# for x in range(1,100//5):
#     for y in range (1,100//3):
#         for z in range (1,100):
#             if x + y + z == 100 and 5*x + 3*y + z/3 ==100:
#                print(x,y,z)
#=====================================================
阅读更多

没有更多推荐了,返回首页