#C5151. Division vs. Product Check
Division vs. Product Check
Division vs. Product Check
You are given two integers \(A\) and \(B\). Your task is to compute the integer division result using floor division: \(\lfloor\frac{A}{B}\rfloor\) and the product \(A \times B\). For each test case, if the product is greater than or equal to the division result, output SUCCESS
; otherwise, output FAILURE
.
The program should first read an integer \(T\) from standard input, representing the number of test cases. Then, for each test case, the program will read two space-separated integers \(A\) and \(B\). For each test case, print the appropriate result on its own line.
Note: All operations are performed as integer operations. The division operator follows floor division semantics.
inputFormat
The first line of input contains a single integer \(T\), the number of test cases. Each of the following \(T\) lines contains two space-separated integers \(A\) and \(B\).
outputFormat
For each test case, output a single line containing either "SUCCESS" or "FAILURE" depending on the condition:
- If \(A \times B \geq \lfloor\frac{A}{B}\rfloor\), print "SUCCESS".
- Otherwise, print "FAILURE".
2
8 4
10 2
SUCCESS
SUCCESS
</p>