“浪潮杯”山东省第六届ACM大学生程序设计竞赛Single Round Math

import java.math.BigInteger;  
import java.util.Scanner;  
  
public class Main {  
  
    public static void main(String[] args) {  
    
        Scanner in = new Scanner(System.in);  
        BigInteger t=in.nextBigInteger(); 
        while(!t.equals(0)){  
            BigInteger a = in.nextBigInteger();  
            BigInteger b = in.nextBigInteger();  
            if(a.equals(b)&&(a.mod(BigInteger.valueOf(11))).equals(BigInteger.valueOf(0)))  
                System.out.println("YES");  
            
            else   
                System.out.println("NO");  
           t=t.subtract(BigInteger.valueOf(1));
        }         
    }  
}  

你可能感兴趣的:(“浪潮杯”山东省第六届ACM大学生程序设计竞赛Single Round Math)