断断续续的学了很久的python,有很多又忘记了。从今天开始用实例再进行一次学习,并记录。本人小白一个,请大家多多指教。

 #!/usr/bin/env python3
# -*- coding: utf-8 -*- """ 题目一:有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?""" __author__ = 'Fan Lijun' sum = 0
for i in range(1, 5):
for m in range(1, 5):
for n in range(1, 5):
if i != m and i != n and m != n:
print(i*100 + m * 10 + n)
sum += 1 print(f'一共有{sum}个三位数。')

最新文章

  1. iOS开发小技巧 -- tableView-section圆角边框解决方案
  2. NOIP 赛前模拟记录
  3. 如何比较两个SQL数据库的字段差别。
  4. python2.X和3.X的一些区别【整理中】
  5. zju3547
  6. flex容器属性(一)
  7. node.js中log4js的使用
  8. codeforces 258div2 A Game With Sticks(DP)
  9. jquery 日期控件
  10. Struts2 Annotation 默认返回Tiles2布局
  11. php之Cookie与Session详解
  12. do-while、while、for做循环算5的阶乘
  13. 在Ubuntu中设置DNS域名服务器端
  14. CString/string 区别及其转化
  15. cygwin下如何编译安装minicom?
  16. ES6中的Promise使用方法与总结
  17. Linux内核源码目录
  18. spring低版本报错:java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class [*] are only available on
  19. 分水岭分割算法(watershed segmentation)的C++实现(法2)
  20. 三十分钟理解博弈论“纳什均衡” -- Nash Equilibrium

热门文章

  1. tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].
  2. 【Leetcode】【Medium】Subsets II
  3. 你所不知道的C和C++运行库 标签: vc 2017-05-26 10:33 41人阅读 评论(0) 收藏
  4. 【深入理解JAVA虚拟机】第二部分.内存自动管理机制.1.内存区域
  5. CSV 文件读写
  6. 利用Underscore求数组的交集、并集和差集
  7. Oracle表空间、段、区和块简述
  8. Failed to read candidate component错误
  9. nbu异地备份实施前,数据收集日志
  10. 8、SpringBoot-CRUD默认访问的首页以及thyleaf的静态文件引入/WebMvcConfigurer / WebMvcConfigurationSupport