全年中6位数字都不相同的日期
- 时间:2020-06-17 18:43:17
- 分类:数学世界
- 阅读:145 次
全年中6位数字都不相同的日期:有一种用6位数表示日期的方法,例如:940812表示1994年8月12日,用这种方法表示1991年全年的日期,那么全年中6位数字都不相同的日期共有多少天?
此题解答如下:采用尝试的方法。首先摆摆一月的情况:9101□□,发现1重复了,所以一月六位数字各不相同的日期没有。再看二月的情况:9102□□,因为0、1和2前面都已有了,而二月又没有三十几号,第五位不能为0、1、2、3,所以二月符合要求的天数也没有。
看看三月:9103□□,0、1和3前面已经有了,所以第五位只能用2,这样符合要求的日期便有3月24号、25号、26号、27号、28号,共有5天。
同理四有也有5天符合要求,五月、六月……同样如此,请你思考一下,最多可以到几月份?
对了,只能到八月份。因为9前面已经有了,而十月、十一月、十二月都要用到1,前面也用过了。
所以,只有三~八月,共有6个月里有符合要求的日期,且各为5天(想想为什么都恰好是5天?)
最后总天数为:5×6=30(天)。
推荐阅读:Using the OpenSSL command to Test the SSL Certificate Algorithm to Shuffle String in Python3 According to Index Depth First Search Algorithm to Find the Strobogrammatic Number Depth First Search Algorithm to Compute the Diameter of N-Ary Tr Remove the Temporary Files (including Windows.old) on Windows 10 Simulation Algorithm to Compute the Number of Water Bottles Using CloudFlare Worker Serverless Technology to Deploy a Load B Algorithms to Compute the Math Power(a, n) in logarithm Complexi Multithreading Testing using Pythons’ Low Level _threading Algorithm to Count the Number of Substrings With Only 1s
- 评论列表
-
- 添加评论