LightOj 1214 - Large Division
// Verdict : Accepted
- import java.util.*;
- import java.math.*;
- class Main
- {
- public static void main (String[] args)
- {
- Scanner in = new Scanner(System.in);
- long tc,t;
- tc=in.nextInt();
- for (t=1;t<=tc;t++)
- {
- BigInteger a=in.nextBigInteger(),b=in.nextBigInteger(),m;
- a=a.abs();b=b.abs();
- m=a.mod(b);
- if(m.equals(BigInteger.valueOf(0)))
- {
- System.out.println("Case "+t+": "+"divisible");
- }
- else
- {
- System.out.println("Case "+t+": "+"not divisible");
- }
- }
- }
- }
Comments
Post a Comment