logo AlgoBeat OnlineJudge
登录 注册

#212684. [ICPC 2025 NAC] Solar Farm

内存限制:2048 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You are building a new solar farm. The area in which you are allowed to build is a circular field of radius , and the solar panels each take up a rectangular space of size . You must place all the panels in the same orientation of your choice in a single rectangular array (so that all of the panels combined exactly form a single rectangle). What is the maximum number of panels that you can fit in this farm?

输入格式

The first line of input contains a single integer (). This is the number of test cases.

The next lines of input each represent one test case and consist of three space-separated integers , , and (): the radius of the field, the width of each solar panel, and the height of each solar panel, respectively.

输出格式

For each test case, print a line with a single integer: the maximum number of solar panels that can be placed in a solar farm within the circular field.

样例

样例输入 1

3
5 4 3
2 2 2
8 1 5

样例输出 1

4
1
24

样例输入 2

2
500000003 1 600000010
511374200 637192506 100000000

样例输出 2

799999999
7

数据范围与提示

The diagram below illustrates one optimal layout of solar panels for each of the three test cases in Sample Input 1 (from left to right).