# | Problem | Pass Rate (passed user / total user) |
---|---|---|
12913 | Big number addition |
|
13991 | Man in the Mirror |
|
Description
In the most of arithmetic addition case, we can simply use int or long long to store the two integers and compute the answer by the operater '+' in C. If we have two big integers that can not be stored into the varibles mentioned below, we should make use of arrays to complete the addition task.
Given two big number A, B, please compute A + B.
Input
First line contains an integer which denotes the length of A. The following one line contains the big integer A.
Third line contains an integer which denotes the length of B. The following one line contains the big integer B.
(1 ≤ number of digits of A, B ≤ 100, both A and B are intergers ≥ 0)
Output
An integer which denotes the answer of A + B.
Note that you don't need to print '\n' at the end of the output
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Abbachio finds himself in a fight with a very dangerous opponent. The opponent, Man in the Mirror, uses mirrors to attack Abbachio so in order to defeat him, he must be able to find which surface is a mirror. Luckily, his stand, Wordy Bluez, can create words and put them on a surface. If his stand puts a word on a surface, the words will be reflected back creating a palindrome.
A palindrome is a word that is written the same way when read from the front and back (e.g. deed, kayak, rotator). The word can be even numbered or odd numbered and can even be complete nonsense (e.g. elelelelele). If a word is a palindrome, Abbachio will know where the opponent is, however, if the word is not a palindrome, he is safe.
Help Abbachio code a program that takes in q number of strings (1 < n < 106) and prints out "Yes" if a string is a palindrome and "No" if it is not.
Input
The first line of input will contain the number of strings q (1 < q < 500).
It is then followed by q lines of strings with size n (1 < n < 106).
Output
Print "Yes" or "No" for each given string followed by a "\n".