zoukankan      html  css  js  c++  java
  • hdoj 2075 A|B?

    A|B?

    Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
    Total Submission(s): 18491    Accepted Submission(s): 14035


    Problem Description
    正整数A是否能被正整数B整除,不知道为什么xhd会研究这个问题,来帮帮他吧。
     
    Input
    输入数据的第一行是一个数据T,表示有T组数据。
    每组数据有两个正整数A和B(A,B<10^9)。
     
    Output
    对于每组输入数据,输出"YES"表示可以被整除,"NO"表示不能被整除。
     
    Sample Input
    2 4 2 5 3
     
    Sample Output
    YES NO
     
    Author
    xhd
     
    //水题,嗯嗯~ o(* ̄▽ ̄*)o
    import java.util.Scanner;
    
    public class Main {
        public static void main(String[] args) {    
            Scanner cin = new Scanner(System.in);
            int n = 0 ;    
            n = cin.nextInt(); 
            while( n-- > 0 ){
                int x = 0, y = 0;
                x = cin.nextInt();
                y = cin.nextInt();
                if( x%y == 0) 
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
    }
     
  • 相关阅读:
    [离散数学]集合3.1、3.2、3.3
    Hadoop YARN ResourceManager 未授权访问漏洞复现
    dns域传送漏洞
    文件包含漏洞详解
    XXE漏洞详解
    常见cms
    IP地址详解
    帧详解
    IP包头内容详解
    SSRF漏洞详解
  • 原文地址:https://www.cnblogs.com/upstart/p/6066908.html
Copyright © 2011-2022 走看看