HDOJ 2524 矩形A + B

来源:互联网 发布:尚品宅配圆方软件下载 编辑:程序博客网 时间:2024/06/05 13:28

HDACM 2524

import java.util.Scanner;//1 2 3 4 //1 3 6 10 public class Main{    public static void main(String[] args) {        Scanner sc = new Scanner(System.in);        int t = sc.nextInt();        while(t-->0){            int n = sc.nextInt();            int m = sc.nextInt();            System.out.println((n*(n+1)/2)*(m*(m+1)/2));        }        sc.close();    }}
原创粉丝点击