#1: Broken Labeler
You need to label a large number of files from 1 to N, but one number key on your labeler is broken. Write a program that prompts the user for N and the broken number key, then prints the highest possible file number the user can print on the labeler. For example, if the user enters N=56781232 and the broken number key is 2, then the highest possible file number is 56781199.
#2: Look and Say
A "look and say" sequence is constructed as a list of numbers. Each term of the list after the first term reports the frequency and group of like digits in the preceding term. In the sequence "1, 11, 21, 1211, 111221," for instance, the fifth term (111221) reports that in the fourth term (1211), there were "one one" (1-1 ...), "one two" (... 1-2 ...) and "two ones" (... 2-1). The next term in the sequence would report that there were "three ones" (31 ...), "two twos" (... 22 ...), and "one one" (... 11) in 111221, resulting in a sixth term of 312211.
Write a function that takes a number as input, validates that it is a positive whole number, and prints the first 10 terms of a "look and say" sequence, including the input number as the first term in the sequence.
#3: Phone Numbers
A company is choosing phone numbers for its employees. In order to avoid confusion, the company has decided that no phone number will contain the same digit more than once in a row (so 0232 is allowed, but not 0223 or 0222). Additionally, any phone number that contains a 4 must begin with 4. The company has also decided to exclude up to three additional digits from the number, but it hasn't decided which ones yet. Write a function that takes the length of the phone number and the additional digits to be disallowed in the number as parameters and prints all possible valid phone numbers. You may assume valid input.
#4: Jumpers
The game "Jumpers" is played by two players on a board configured in an NxN grid. Each space in the board can be unoccupied or occupied by a piece from either player.
During a player's turn, the player attempts to jump over as many of the opponent's pieces as possible. A piece can jump over a single opponent's horizontally or vertically adjacent piece if the landing space (the next space in the same direction) is unoccupied. After landing, the same piece can immediately jump over another opponent's piece to which it is now horizontally or vertically adjacent, and so forth until no more jumps are possible for that piece. The player's piece cannot jump over the same piece more than once.
Write a function which finds the number of jumps in the longest possible jump path for a piece at a given location on a board. The two-dimensional array representing the board and the coordinates of the specific piece will be passed into the function as parameters. In the array, 0 denotes an unoccupied space, 1 denotes a space in which Player 1 has a piece, and 2 denotes a space in which Player 2 has a piece. You may assume the input is valid.
For example, if this is the board:
0 2 0 0
2 0 2 0
0 1 1 2
0 2 1 0
and (2,2) is the given location, the number of jumps in the longest possible path is 3 since the piece at that location can jump up, then left, and then down.
我们长期稳定承接各大科技公司如Epic、Uber、Amazon等的OA笔试代写服务,确保满分通过。如有需求,请随时联系我们。
We consistently provide professional online assessment services for major tech companies like TikTok, Google, and Amazon, guaranteeing perfect scores. Feel free to contact us if you're interested.

