题库练习 Data Center
← 上一题 下一题 →

A13034 | Data Center

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

You are developing a project to build a new data center. The data center will be a rectangle with an area of exactly $n$ square meters. Each side of the data center must be an integer.

Your goal is to minimize the impact of the external environment on the data center. For this reason, you want to minimize the length of the perimeter of the data center (that is, the sum of the lengths of its four sides).

What is the minimum perimeter of a rectangular data center with an area of exactly $n$ square meters, if the lengths of all its sides must be integers?

输入格式

The first and only line of the input contains an integer $n$ ( $1 \le n \le 10^5$ ), where $n$ is the area of the data center in square meters.

输出格式

Print the required minimum perimeter in meters.

输入输出样例

输入 #1
36
输出 #1
24
输入 #2
13
输出 #2
28
输入 #3
1
输出 #3
4
C++ 编辑器
输入
输出