#P1405. 苦恼的小明
苦恼的小明
Description
Huang Xiaoming and his partner want to start an English training institute. When registering, they need to fill out a personal information form, and Xiaoming is troubled by the height field.
The height must be accurate to centimeters, but Xiaoming is so tall that such a long number cannot fit on the paper. He bribed the staff, so he only needs to write the result of his height modulo .
However, Xiaoming does not know how to take a modulus. Remembering that you helped him solve the reservoir problem a few days ago, he came to you again for help.
Input Format
Xiaoming’s height is represented as . The first line contains , and the second line contains positive integers representing to .
Output Format
Output a single number representing Xiaoming’s height .
2
17 747
173
Hint
All .
For testdata 1–6, .
For testdata 7–10, .
For testdata 11, .
Translated by ChatGPT 5
京公网安备 11011102002149号