#P16262. [蓝桥杯 2026 省 Python B 组] 定制展示盘
[蓝桥杯 2026 省 Python B 组] 定制展示盘
Problem Description
Xiao Lan is designing a display tray for storing commemorative coins.
Due to limitations of the manufacturing equipment, the tray must satisfy the following conditions:
- The tray is a rectangle, consisting of several rows and several columns of slots.
- The number of rows and the number of slots in each row are both at least .
Xiao Lan has a total of commemorative coins to place. He can customize trays of different sizes as needed, as long as the total number of slots on the tray (i.e., the product of the number of rows and the number of slots per row) is at least .
The manufacturing cost is calculated based on the total area of the tray (i.e., the total number of slots). Therefore, under the placement requirement and equipment constraints, Xiao Lan wants the total number of slots to be as small as possible. Now please help him compute this minimum value.
Input Format
The first line contains a positive integer , representing the number of test cases.
The next lines each contain a positive integer , representing the total number of commemorative coins Xiao Lan has.
Output Format
Output lines in total. Each line contains an integer, representing the minimum total number of slots required for the display tray under all constraints.
2
3
5
4
6
Hint
Sample Explanation
When , one optimal plan is to customize a display tray, and the total number of slots is .
When , one optimal plan is to customize a display tray, and the total number of slots is .
Constraints
For of the test cases: , .
For all test cases: , .
Translated by ChatGPT 5