When we want to numbers a large number of data, there is a limit on the number of digits, such as a five-digit license plate number, a ten-digit license number, order serial number, and a short URL, we can use the 36-digit system to calculate non-repeated numbers that match the number of digits.
We use 0-Z (0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ) to represent the
Because I needed to perform the escalation, verification, and query of the 15-digit old ID card number, and did not find any ready-made functions, I wrote a simple process and hoped to help my friends.This function has a single function and can only verify whether the 18th-bit number is correct or obtain the 18th-bit number. Other functions can be expanded by yourself!'Version: 1.0.1'Author: sfply (sfply@163.com)'Last modified: 2004/7/17 12:03'Src is
Hdu 1066 Last non-zero Digit in N! (Number Theory -- n! ), Hdunon-zero
Last non-zero Digit in N!
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission (s): 6432 Accepted Submission (s): 1593
Problem DescriptionThe expression N !, Read as "N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for example,
N!
0 1
1 1
2 2
3
What is the vampire number.
A vampire number is a number that has an even number of digits, and can be multiplied by a pair of numbers, and this pair of digits contains the half digits of the product,
The number that is selected from the initial number can be sorted arbitrarily. The number ending with two 0 is not allowed,
For example, the following numbers are "vampire" numbers:
1260 = 21 * 60
1827 = 21 * 87
2187 = 27 * 81
Programming Ideas
The first step , first, is to split the given four
This article mainly introduces how to generate a unique number in PHP. In this article, convert the hexadecimal value to 36 to obtain more than 60 million unique numbers that are not repeated, with the number of digits being 10 digits, if you need a large data number, you can refer to the following, for example, the five-digit license plate number, the ten-digit license number, the Order serial number, and
1. Question (from Rosen, "Elementary number theory and its application" 6th P99 5th)The last two decimal digits (bits and 10) that prove the total square number must be one of the following: {xx, E1, E4, O6, E9}Note: E = even number, O = prime number, 0 is also an even number2. Verify
N
N2
End number Pair Type
0
0
00
1
1
E1
2
4
E4
3
9
E9
4
16
E4
Match the 18-bit ID number and the regular expression is as follows:/^[1-9][0-9]{5} (19|20) [0-9]{2} ((01|03|05|07|08|10|12) (0[1-9]|[ 1-2][0-9]|31) | (04|06|09|11) (0[1-9]| [1-2] [0-9]|30] |02 (0[1-9]|[ 1-2][0-9])) [0-9]{3} ([0-9]|x| X) $/Note: Now the ID number is already 18, there is no need to consider matching 15 bit.18-digit ID Number: 6-digit area + 4-year + 4-month-day + 3-
Now that the new ID card has risen from 15 to 18, many software may use the ID card input, the verification work, regarding the new ID card code seems very few articles, I found in 2000 the computer world an article, discovered that now the ID card verification code actually possibly is the English letter x ( In fact, this x is the Roman alphabet, meaning 10, why use the alphabet? Who knows. At least the number key on the phone will not be a new number. (now the method is to use * substitution,
Overview
A previous blog post details the design ideas & logic of a single control crawl and how to use it, and this article will detail the bulk control crawl functionality.
Bulk Crawl: Open a Web page, traverse all the elements on the page that
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, then how to determine the check bit, with a
Why is the last digit of my ID card X? In the mandatory national standard gb120043 citizenship numbers, there are clear provisions on citizenship numbers. Currently, there are 18 ID card numbers, each of which has a clear meaning. In the order from left to right, the first six digits are called "address codes", indicating the administrative divisions of the county (city, flag, district) where the resident account is located.Code. This part is encoded
Rightmost DigitTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 40200 Accepted Submission (s): 15181Problem Descriptiongiven A positive integer N, you should output the most right digit of n^n.Inputthe input contains several test cases. The first line of the input was a single integer T which is the number of test cases. T test Cases follow.Each test case is contains a single positive integer N (1Outp
Rightmost Digit time limit:2000/1000ms (java/other) Memory limit:65536/32768k (Java/other) total submission (s): 87 Accepted Submission (s): 38Font:Times New Roman|Verdana|GeorgiaFont Size:← →Problem Descriptiongiven A positive integer N, you should output the most right digit of n^n.Inputthe input contains several test cases. The first line of the input was a single integer T which is the number of test ca
233. Number of Digit OneTotal accepted:20083Total submissions:79485 difficulty:hard Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to N.For example:Given n = 13,Return 6, because digit 1 occurred in the following numbers:1, 10, 11, 12, 13.Idea: Accumulate the total number of each
Rightmost digit
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 12357 accepted submission (s): 4773 Problem descriptiongiven a positive integer N, you should output the most right digit of N ^ n.
Inputthe input contains several test cases. The first line of the input is a single integer T which is the number of test cases. t test cases follow.
Each te
TopicGiven an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to N.For example:Given n = 13,Return 6, because digit 1 occurred in the following numbers:1, 10, 11, 12, 13.Ideas[Number of 32]1 of the algorithm seriesCode/ *---------------------------------------* Date: 2015-07-19* sjf0115* title: 233.Number of Digit
Rightmost DigitProblem Descriptiongiven A positive integer N, you should output the most right digit of n^n.Inputthe input contains several test cases. The first line of the input was a single integer T which is the number of test cases. T test Cases follow.Each test case is contains a single positive integer N (1Outputfor Each test case, you should output the rightmost digit of n^n. Sample Input234Sample O
This
Algorithm I have a search on the Internet. For now, I feel that my algorithms are the most suitable.
The most recent case involves bar code printing. The request is a unique sequence. There is a date in the middle, and the last three digits are the serial number. But the number of printed sheets will exceed 999;Therefore, 26 uppercase letters are required. The requirements are as follows: 999 is a common number (001 ~ 999), then we start to use a hundred letters, that is, the last
Thought: At the beginning, I found it very tangled !!
Later, I saw a person's analysis, which was converted in this way.
M = n ^ N; obtain the logarithm of the two sides. log10 (m) = N * log10 (n); then, M = 10 ^ (N * log10 (n ));
Then, for the integer power of 10, the first digit is 1. Therefore, the first digit depends on the decimal part of N * log10 (n ).
In short, log is very powerful. In order
public class Identitynum {
public static void Main (string[] args) {
System.out.println (Getlastidnum ("37018319880321312"));
}
/**
* Name: The last one to calculate the 18-digit ID card
* Function: According to the first 17 ID number, please the last one
* The last one of the ID card algorithm:
* 1. Multiply the first 17 digits of the ID card number by the weights: 7 9 10 5 8 4 2 1 6 3 7 9 10 5 8 4
* (for example: First is multiplied b
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.