@@ -0,0 +1,989 @@
+//https://www.hackerrank.com/challenges/restaurant%0Aimport java.io.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        StringBuffer sb = new StringBuffer();%0A        %0A        //INPUT%0A        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));%0A        for(short T = Short.parseShort(br.readLine()); T %3E 0; --T)%7B%0A            String%5B%5D input = br.readLine().split(%22 %22);%0A            final short L = Short.parseShort(input%5B0%5D);%0A            final short B = Short.parseShort(input%5B1%5D);%0A            %0A            //SOLVE%0A            final short factor = gcd(L, B);%0A            final int pieces = (1*L*B)/(1*factor*factor);%0A            %0A            //OUTPUT%0A            sb.append(pieces + %22%5Cn%22);%0A        %7D%0A        System.out.print(sb);%0A    %7D%0A    %0A    private static short gcd(short a, short b)%7B%0A        while (b != 0)%7B%0A            short c = a;%0A            a = b;%0A            b = (short)(c %25 b);%0A        %7D%0A        return a;%0A    %7D%0A%7D%0A

Create restaurant.java