2411 - I2P(I)2021_Hu_HW6 Scoreboard

Time

2021/10/28 00:00:00 2021/11/08 18:15:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12934 Rotate Numbers
13312 Grab the Banana, Kris!
13313 Energy Gun

12934 - Rotate Numbers   

Description

Given a large integer, please rotate the whole number by 180and print out the result.

 

For example:

However, sometimes after you rotate the number, it becomes meaningless, for example:

Besides, after you rotate the number, if there are some zeros in the front, do not print them out, for example:

 

Input

The input contains an integer N,  which N is no more than 100 digits.

Output

Output the 180 degree rotated number, if the rotated number is meaningless, output "No". Please add a newline at the end of your answer.

Sample Input  Download

Sample Output  Download

Tags




Discuss




13312 - Grab the Banana, Kris!   

Description

While venturing in a Cyber's World, Kris came across a box containing a bunch of magic letters. The letters can change to any character in the keyboard and if they are used to form a word, the letters will turn into that object. As Kris was inspecting the box, his 'acquintance', Queen, told him to 'Grab the Banana'. Without a banana in sight, Kris decided to make a banana using the words in the box.

 

 

Kris can use the words to create a single string which must be spelled as 'BANANA' or else the magic letters won't work. To do this, Kris will input a character one by one into the string. However because the words are very hard to control and that Kris has eaten too much moss, Kris is bound to make many spelling errors. Luckily, he can transform the letter to the '/' sign to delete his mistake So if he accidentally spelled ' BANANP', he can use a '/' to change it back to 'BANAN', and continue from there.

While Kris is doing the work, Queen will keep count of the number of letters Kris got right so far, so if the string so far is 'BANA', Queen will output '4'. If the string Kris created is wrong (e.g. 'BANANP'), Queen will output '-1'.

If he manages to create the string 'BANANA', Queen will output 'Potassium!', and every other character in the input will be ignored. (e.g. 'BANANANANANA' will still output 'Potassium!' since the word 'BANANA' is made) 

On the other hand, if he accidentally puts a number 0 into the string, no more letters can be added. The letters in the box can also run out. In this case, Queen will output 'No Potassium.' in disappointment.

Help Kris make a banana with the magic letters.

hint: It is better to use counters to keep track of the letters and examine whether the string so far is correct.

Input

A string of characters (special characters included and all alphabetical letters will be uppercase) Scan until EOF

Output

If the banana is successfully made, print:

'Potassium!'

else print:

'No potassium.'

with a newline character trailing both.

Sample Input  Download

Sample Output  Download

Tags

1



Discuss




13313 - Energy Gun   

Description

Samus Aran received an energy gun before her next mission. The energy gun is a very powerful weapon that uses integers to shoot. However there is one problem with the energy gun, there is an N second delay. If Samus inputs a list of numbers, she must wait N seconds before the weapon starts to shoot out the numbers.

To use it, Samus will input an integer into the gun every second for M seconds. Afterwards, each integer she inputs will remain inside the energy gun for N - 1 seconds and it will be outputted during the Nth second.

Help Samus understand the code for this weapon by writing the code down for her to read.

Input

The first line will contain 2 integers, N and M.

1<= N, M <= 50

N is the delay of the weapon.

M is the amount of seconds Samus will input integers.

The next line will contain M integers, the integers Samus will input into the code

Output

The output of the weapon followed by a newline character after M seconds.

If the gun makes no output, the output value will be 0.

Sample Input  Download

Sample Output  Download

Tags




Discuss