A 长方体

链接: https://www.nowcoder.com/acm/contest/109/A
来源:牛客网

题目描述

给出共享长方体一个顶点的三个面的面积,求它十二条边的边长和。

输入描述:

一行三个整数a, b, c表示面积(1 <= a, b, c <= 10000)。

输出描述:

一行一个整数表示边长和。

#include<bits/stdc++.h>
using namespace std;
typedef long long ll; 
int main()
{
    ll a,b,c;
    cin>>a>>b>>c;
    ll w=sqrt(a*b*c);
    cout<<4*(w/a+w/b+w/c)<<endl;
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_41333844/article/details/80247070