АВТ
Language:

Remote Training on Programming

Problems On-line status Contests FAQ
For authors:
Register  ||  Login
 
Hello, Guest! Login or register.

41. Divisibility

Time Limit: 1 seconds
Memory Limit:1000KB
Points:10
View Problem Statistics Submit Problem added Administrator

Даны два натуральных числа a и b. Проверьте, делится ли первое из них на второе.

Input

<В первой строке записано число a, состоящее не более чем из 10000 цифр. Во второй строке записано число b, не превышающее 1000.

Output

Слово YES, если первое число делится на второе, и NO - если нет.

Samples

InputOutput
15
5
YES
15
8
NO

Comments

Если обощить вопрос 1 к главе III, то получается довольно изящное решение.


View Problem Statistics Submit Author/source:
Sorted Problems / Mathematics / Theory of numbers /
470. Divide into pairs 41. 880. Doubling and increment 15. Factorials 17. Factorials 2
Problems from Contests / Trainings of Vologda STU / Training 28.10.2010 /
897. A - Euclid's algorithm 41. 470. C - Divide into pairs 99. D - Joke
We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems. Donald E. Knuth.
time generating 0.062 sec.
© Copyright VSTU, AVT, Nosov D.A.