Huawei trial-subtraction of large numbers, Huawei large numbers
Question: subtraction of large numbers
Enter a positive integer of two strings. The first line is the subtrahend, the second line is the subtrahend, and the result of the first line minus the second line is output.
Note: 1. Both integers are positive integers. The subtrahend are greater than the subtrahend. Example:
Input: 1000000000000001 1
Output: 1000000000000000
# Include
Test
Huawei trial-outputs a single digit and a single digit, While Huawei outputs a single digit
Two solutions:
1. Add one by one
# Include
2. Convert to string Addition
# Include
Huawei trial-difference sorting, Huawei difference sorting
Sorts the integer array by the difference value from the specified integer and returns the result in ascending order of the difference value.
Implementation Method:
Public staticint [] calcTimes (int [] num, int value );
[Input] num: an integer array;
Integer specified by value
[Return] returns an integer array in ascending order, sorted by the difference between each integer and the specifi
Huawei machine trial-same sub-string, Huawei Machine
Enter a string to check whether the string contains the same substring (the string length is greater than 1). The value is output 1, no, and output 0.
For example, 12312 contains two 12 s, so output 1; 23456 does not have the same subsequence, and output 0.Input: 12312
Output: 1
# Include
Test data:
12312
Test results:
Huawei trial-word count, Huawei word count
Enter an article, and output the words with the highest frequency and the secondary frequency (all in lower case, separated by commas ). Only the space, comma, and period delimiters are displayed in the article.
Regardless of the frequency. Case Insensitive.
Input: I am a student. I come from XiDian, I love XiDian.
Output: I, xidian
#include
Huawei machine trial-string de-sequencing, Huawei machine string sorting
Enter a string, remove the repeated characters, and sort the remaining strings.
# Include Test data:
Dfsfsf3345s
Test results:
Huawei trial-minimum frequency and minimum frequency
Enter a string with the minimum number of occurrences or the minimum frequency.
# Include
Test data:
Cccbbbbfffftgggggst
Test results:
Huawei trial-output number containing "23", Huawei 23
Enter a row of numbers: 123 423 5645 875 186523In the input second line: 23Output and sort the number containing "23" in the second row in the first row
Result: 123 423 186523
/* Sort and traverse each number sequentially to see if 23 */# include
Test data:
123 423 5645 875 186523
23
Test results:
Huawei trial-replace letters in strings with Huawei strings
Function Description: replace all the letters in a string with the next letter. If the last character is z or Z, replace it with A or.
* Input: aBxyZ
* Output: bCyzA
# Include
Huawei trial-converts the initial character string to uppercase, and Huawei capitalExample:Input: this is a book
Return Value: This Is A Book
# Include
[Huawei machine trial exercise questions] 15. Delete duplicate characters/delete duplicate strings, Huawei exercises
Question
Title: delete duplicate characters. Given a string, remove all redundant characters in the string that have already been duplicated. Keep the remaining characters and output the processed string. Ensure the order in which the characters appear and are case sensitive. Description: interface prototype: int GetResult (const char
[Huawei machine trial exercise] 13. Enter the train station, Huawei enter the train station
Question
Description: a positive integer N is given to indicate the number of trains. The value is 0
Ideas
1. If n = 1, it is an arrangement. 2. When n> 1, first obtain the order of n-1's outbound stack, and then separately insert n into n-1, N-1 and every number after N-1!
Code
/* ------------------------------------- * Date: 2015-06-30 * Author: SJF0115 * T
[Huawei machine trial exercise questions] 9. coordinate movement, Huawei exercise questions
Question
Develop A coordinate computing tool. A indicates moving to the left, D indicates moving to the right, W indicates moving up, and S indicates moving down. Start from (0, 0), read some coordinates from the input string, and output the final input result to the output file.
Input:
Valid coordinate is A (or D, W, or S) + number (within two digits)
The coo
Introduction: This is a powerful php collection tool: Snoopy trial details page, introduced and PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339654 'rolling = 'no'> What Is Snoopy? (Download Snoopy) Snoopy is a PHP class used to imitate the functions of a Web browser. It can complete the task of obtaining webpage content and sending fo
to maintain the state at first, because it is troublesome to draw stars and bombs with rewards .. So, show the points. In this way, you can try it out first :)
Game. score = {basic: 0, operate: 0, star1: 0, star2: 0, Boom: 0, draw: function () {var startx = game. cellwidth * 10 + game. map. startx; var starty = game. map. starty; var CTX = game. CTX; CTX. save (); CTX. translate (startx, starty); CTX. clearrect (0, 0,150,400); CTX. strokestyle = "#456"; // CTX. strokerect (0, 0,150,200); CTX.
Order:
Recently, I was eager to create an Asp.net Ajax test project, originally using Ajax. but later I found that Asp.net Ajax is easier to apply in Asp.net, so I decided to use Asp.net Ajax for development, and I can also learn about Asp.net Ajax, which is very popular recently. But the day before yesterday I read an article about anthem. net and Asp.net Ajax, and then try again. net, and find the things to be implemented in the original project. net can be achieved, and the ease of use is no
I have read a lot of promotional materials about Windows Vista, and I am already moving forward. In order to conduct a compatibility test today, we finally get a glimpse of it.
The installed version is vista 5365. I think this version is much better than the previous version 5231 I used to test. In addition, the sub-configuration used today is not bad. The CPU is 2.66 GB, and the memory is 512 MB, the key is to have a high-end graphics card with 128 M memory, so that aero and flip3d can be used
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.