- محدودیت زمان: ۱ ثانیه
- محدودیت حافظه: ۲۵۶ مگابایت
The team with the most solved problems will win the contest. Mr. J. Khiabani
AbulHassan is my friend. He has taken introduction to programming course this semester. He always asks me to help him with his programming assignments. Most of the times I unwillingly open his messages. Because, I don’t have much time to do his homework for him.
Last night, He texted me about his new homework question. Actually, this time I didn’t have to worry about his homework. You have to worry! :D . The Question wasn’t complicated. Here it is:
Given three integers $a, b, r$. Is there any integer $q$ satisfying the following equation: $$a = bq + r$$
ورودی
The first line of the input contains $T$ the number of the test cases. $$1 \leq T \leq 100$$
Each test case contains three integers in a single line $a, b, r$ respectively. $$0 \leq a, b, r \leq 100 $$
خروجی
For each test case, print Yes
if there exists an integer $q$ satisfying the equation. Otherwise print No
.
مثالها
ورودی نمونه ۱
3
7 2 1
25 5 5
7 2 2
خروجی نمونه ۱
Yes
Yes
No
ارسال پاسخ برای این سؤال