TWO FRIENDS AT THE ZOO
These days, Sid and Jake are learning about number theory. They have just visited the zoo and during the visit they have counted(yes, they are superb at counting :) ) the number of animals at the zoo. Now, after visiting the zoo, Sid is saying that f is a factor of the total number of animals at the zoo and Jake is saying that m is a multiple of the same.
Now, you have to say whether both are correct or not.
- The first line of input has a number t, number of test case. Each test case consists of two space separated integers f and m.
- Print “CORRECT”(without quotes) if both Sid and Jake are correct, print “WRONG”(without quotes) otherwise.
- 1 <= t <= 105
- 1 <= f,m <= 1018
Input: 2 1 4 2 3 Output:
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions