Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
Note:N is positive and would fit within the range of a 32-bit signed integer (n
Example 1:
Input:3
Output:3Example 2:
Input:11
Output:0
Explanation:The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, one, one, ... is a 0, which are part of the number 10.
Here are the
Now we use all 18-digit ID card numbers, and the previous 15-digit ID card numbers. How can we convert a 15-digit ID card number to an 18-digit ID card number?
1. First, after 6th digits of the 15-digit ID card, "19" is changed to 17 digits, that is, the Year of birth plus 1
of analysis is the same. From this we can conclude that we want a function (that is, the SetAll () of the following code) to figure out the total number of probabilities that are smaller than the current number, and then add up to +1 is the desired result, see Code implementation:
// Function function: get each bit, if it is another number, the total number of possibilities is smaller than the cu
Array-07. Find the largest single-digit number in a batch of integers,-07 batch
1/* 2 * Main. c 3 * E7-array-07. calculate the four * Created on, which contains the largest number of integers: 5 x/6 7, August 22, 2014 # include
This question is based on the C ++ code of a netizen. After testing, it is found that the execution efficiency of C language is slightl
I am a very watery web programmer, and I have never written any project. I can't find the answer for a long time. The environment is as follows: Archlinux3.16.3Apache2.4.10PHP5.6.0 needs to be selected on the page to select other places... I am a very watery web program, and I have never written any project. I can't find the answer for a long time.
The environment is as follows:
Archlinux 3.16.3
Apache
Transferred from: http://blog.csdn.net/yudandan10/article/details/11878421Computer composition of the Hamming check code, I believe that the learning will have to understand, then the verification of the determination of the bit, I think some people are not very clear, today I would like to detail how to determine the check bit to shareFirst look at the basic concepts:2^r≥k+r+1where r is the check bit, K is the information bit information bit is known
Image processing is a very wide-spread technology, and Python, which has a very rich third-party expansion library, will certainly not miss this feast. PIL (Python Imaging library) is the most commonly used image processing library in Python, and if you are python2.x, you can download it at the following address: http://www.pythonware.com/products/pil/ Index.htm, to find the corresponding version to download it.Note: The PIL module has been replaced i
Yesterday, when using JS to the foreground floating-point number to find that:
0.05+1.08=1.1300000000000001
Check on the Internet there is indeed such a bug, in addition to the number of digits on the control there is no good way (hope that experts can put forward
Other ideas).
So I write a control of the decimal number of the JS method to solve the development of the immediate
Copy Code
Public Static voidMain (string[] args) {//TODO Auto-generated method stubsRandom r=NewRandom (); String Str= "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";//list all the alphanumeric numbers for(inti=0;i//Loop 4 times, output four numbers { intA=r.nextint (62);//a random number from 0-61, as the index of a stringSystem.out.println (str.substring (A,a+1));//use the index from the string to find the output of
JS mobile phone number, zip code, area code, ID card Verification program
Mobile phone Number Inquiryfunction Checkmobile () {var smobile = Document.mobileform.mobile.valueif (!) ( /^13[0-9]d{4,8}$/.test (Smobile))) {Alert ("Please enter your mobile number (at least the first 7 digits)");Document.mobileform.mobile.focus ();return false;}}Postcode inquiryfunction
Because some situations need to use the National Administrative Division database, itself does not have the library on the Internet to find, but found is basically not what I want, because it contains only the basic information,Finally himself under a primitive library to prepare their own assembly data, online XX data network Ah, Web services are limited, or to find their own way to get the hands of the mo
I am a little white. I want to use Baidu zip code to search for an address's zip code and put a php script in my website space. Because the requirements are not very high, I tried to use regular expression matching to find the first group of "Six digits not 0 at the first pl
Php decompress the ZIP file instance code online. I found only a ZLIB function in the PHP function library and it is related to compression, but I am disappointed that he could not solve the ZIP file (ah .... I had to give up. don't say I have no perseverance. in the PHP function library, I only found a ZLIB function and it has something to do with compression, b
PHP executes the zip and rar decompression methods first. it will be used for further research. Zip: PclZip http://www.phpconcept.net/pclzip/index.en.php
Rar: PECL rar http://pecl.php.net/package/rar
In the past, we had to execute the decompression program in php. The most common method was to write the command and run it using the execute function such as exec ().
This may work in Windows, but changing to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.