编程介的小学生 2018-12-27 12:59 采纳率: 20.5%
浏览 253
已采纳

C语言关于象棋棋盘的问题有没有人知道怎么解决的思路是什么?

Problem Description
Consider the problem of tiling an n×n chessboard by polyomino pieces that are k×1 in size; Every one of the k pieces of each polyomino tile must align exactly with one of the chessboard squares. Your task is to figure out the maximum number of chessboard squares tiled.

Input
There are multiple test cases in the input file.
First line contain the number of cases T (T≤10000).
In the next T lines contain T cases , Each case has two integers n and k. (1≤n,k≤100)

Output
Print the maximum number of chessboard squares tiled.

Sample Input
2
6 3
5 3

Sample Output
36
24

  • 写回答

1条回答 默认 最新

  • threenewbee 2019-08-30 23:39
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式