Quantum and Divisibility
Practice
3 (2 votes)
Medium
Prime factorization
Mathematics
Open
Approved
Factorization
Problem
29% Success 3737 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Quantum love solving mathematical problems. One day his teacher give him problem on divisibility to check his mathematical skills. He give him four numbers a,b,c,d and asked him to check whether (a^b) is divisible by (c^d) or not. As the constrains are high, so quantum need your help to answer the query.

INPUT

First line of Input contains no. of test cases T. Each test case contain four numbers a,b,c,d.

OUTPUT

For each test case print "Divisible" if they are divisible and "Not divisible" if they are not divisible (without quotes).

CONSTRAINTS

T<=50

1<= a,b,c <=10^9

0<= d <=10^9

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
4 votes
Tags:
MathematicsMediumOpenApprovedNumber Theory
Points:30
8 votes
Tags:
MathematicsMedium
Points:30
1 votes
Tags:
Medium