In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of java how to achieve ten full hours, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this java article on how to achieve ten full hours. Let's take a look at it.
If the ten digits shown by the electronic timer are a string of 1115093028, it represents 09:30:28 on November 15 th.
In this series, "0" appears twice, "1" appears three times, "2", "3", "5", "8" and "9" each appear once.
But "4", "6" and "7" did not appear. If in the string of numbers shown by the electronic timer, 0meme 1, 2, 3, 4, 5, 6, 7, 8, 9
Ten numbers appear only once, and the moment it represents is called "ten full time", so there are a total of such ten full time in 2003.
Note: record the time according to 24 hours.
First of all, it is impossible to have more than ten full hours in a leap year, because 0229 already has a duplicate number.
So, how many ten hours are there in a year? Here is an "alternative solution".
Months can be 01 to 12, days can be 01 to 31, hours can be 00 to 23, minutes can be 00 to 59, seconds can be 00 to 59.
In other words, 6, 7, 8, 9 can only be a single digit, while 4 and 5 can only be ten digits of minutes and seconds if put on top of ten digits.
So what is the fifth single digit?
If it is 0, then the ten digits of the month is 1, and it can only be October, which is at least 26, which is unreasonable
If it is 1, similarly, 2Jing 3 can not be reasonably arranged to the ten places of the month, day and hour.
If it is 2, similarly, 3 can not be reasonably arranged to the ten of the month, day and hour.
If it is 3, it should be arranged to the ten places of the month, day and hour, and 4 and 5 to the ten places of minutes and seconds. The ten places of the month must be 0.
If you put 2 in the tenth place of the day, there are 2 ways to arrange 4 and 5, 3, 6, 7, 8, 9, 120, 240 in total.
If 2 is put into ten places, it can only be 23. There are 2 ways to arrange 4 and 5, 6, 7, 8, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
There are 288 such subtotals.
If it is 4 or 5, there are two options at this time. The ten of the month is 0, the ten of the month is 1, and the ten of the month is 2. There are two ways to choose the ten places of time and score.
There are still 120 methods for each of the five numbers, with a total of 2 × 2 × 120 × 480.
There are 288, 480, 768 species in total.
The detailed code resolution process is given below.
Package cn.hncu.shiquanshu
Public class Shiquanshu {
Static int count=0
Public static void main (String [] args) {
String str= ""
Sqs (str); / / perform recursive operations
System.out.println (count)
}
Private static void sqs (String str) {
If (str.length ()) = = 10) {
System.out.println (str)
Count++
Return
}
String temp=new String (str)
For (int ionome0nteri0) {
If (str.indexOf (x) > = 0) {
Return false
}
If (str.length () > 0) {
If (str.charAt (0) >'1') {
Return false
}
}
If (str.length () > 1) {
If (str.charAt (0) = ='1') {
If (str.charAt (1) >'2') {
Return false
}
}
}
If (str.length () > 2) {
If (str.charAt (2) >'3') {
Return false
}
}
If (str.length () > 3) {
If (str.charAt (2) = ='3') {
If (str.charAt (3) >'1') {
Return false
}
}
}
If (str.length () > 4) {
If (str.charAt (4) >'2') {
Return false
}
}
If (str.length () > 5) {
If (str.charAt (4) = ='2') {
If (str.charAt (5) >'3') {
Return false
}
}
}
If (str.length () > 6) {
If (str.charAt (6) >'5') {
Return false
}
}
If (str.length () > 8) {
If (str.charAt (8) >'5') {
Return false
}
}
}
Return true
}
}
This is the end of the article on "how to achieve ten full hours in java". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve ten full hours in java". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.