لینک‌های مفید برای شرکت در مسابقه:

در طول مسابقه، می‌توانید سؤالات خود را از قسمت «سؤال بپرسید» مطرح کنید.

A – AbulHassan’s Quest


  • محدودیت زمان: ۱ ثانیه
  • محدودیت حافظه: ۲۵۶ مگابایت

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,ra, b, r. Is there any integer qq satisfying the following equation: a=bq+ra = bq + r

ورودی🔗

The first line of the input contains TT the number of the test cases. 1T1001 \leq T \leq 100

Each test case contains three integers in a single line a,b,ra, b, r respectively. 0a,b,r1000 \leq a, b, r \leq 100

خروجی🔗

For each test case, print Yes if there exists an integer qq satisfying the equation. Otherwise print No.

مثال‌ها🔗

ورودی نمونه ۱🔗

3
7 2 1
25 5 5
7 2 2
Plain text

خروجی نمونه ۱🔗

Yes
Yes
No
Plain text

توضیح تصویر

ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.