Advertisement
bkit4s0

[TWOFRNDS]

May 26th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. import java.io.IOException;
  2. import java.util.Scanner;
  3.  
  4. class type {
  5.     private static Scanner scanner;
  6.  
  7.     public static void main(String args[]) throws NumberFormatException,
  8.             IOException {
  9.  
  10.         scanner = new Scanner(System.in);
  11.         int t = scanner.nextInt();
  12.         while (t-- > 0) {
  13.             int f = scanner.nextInt();
  14.             int m = scanner.nextInt();
  15.             if (f == 1) {
  16.                 System.out.println("CORRECT");
  17.             } else if (m % f == 0) {
  18.                 System.out.println("CORRECT");
  19.             } else {
  20.                 System.out.println("WRONG");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement