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
Submissions
Please login to view your submissions
Similar Problems
Points:30
1 votes
Points:30
5 votes
Tags:
MathematicsDynamic programmingMediumNumber TheoryFactorization
Points:30
Tags:
MathematicsMediumApprovedFactorization
Editorial