NYSFNE - Short form of New Year

no tags 

Billu is a school going student. He has to write the homework in his diary. Every diary has a field of ‘Date’. He writes date in this form ‘13/11/2014’. After his final examination he got some days as holiday. The 1st day of New Year 2015 he went to school and did mistake to write the year name. Instead of 1/1/2015 he wrote 1/1/2014 every time. And you know it’s a common mistake by everyone.

Billu is worried about very large year name like 2364568698(Seems impossible to have a year like this, but billu is a young kid, he just love numbers, so… J ). He is thinking about the students of 2364568698. They have to write their diary every day like 14/11/2364568698, 15/11/2364568698 and so on. Billu’s elder brother Jillu releases him from this very large year problem. Jillu said any year can be written in a short form of 2 digits. The last 2 digits of any year indicate that year. Like 2014 can be written as 14, 2015 can be written as 15. And more precisely 2364568698 can be written as 98.

Now Billu is very happy! He can represent any year in its short form. But he can’t find the short form of ab year. For example, Billu want to find the short form of year 47. 47=16384. So the short form is 84.

Billu needs your help. Write a program that can find the short form of any year of ab form.

Input & Output:

There are several test cases. Each line of input data contains two integers a and b. Where a and b are greater than 3 and both will fit in 32 bit integer range. Program will be terminated by EOF.

Output will be a single line for each test case. Each line contains the short form of year like above.



4 7
5 5
6 4


Authored By : Hasan Abdullah

hide comments
Pranay: 2020-08-06 22:51:05

if the answer is a single digit add a '0' before it to get accepted! Cost me several WA just for that.
@problem_setter: please mention such constraints in the problem.

[NG]: "written in a short form of 2 digits"

Last edit: 2020-08-07 09:24:57
nusrat_ullah: 2019-07-10 11:58:02

Hint : Mod ans with 100 during recursive call.

Added by:Najmuzzaman
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 JS-MONKEY