第17周周赛(大一) --A - Parallelepiped
来源:互联网 发布:简单的php项目 编辑:程序博客网 时间:2024/04/28 11:22
A - Parallelepiped
Crawling in process...Crawling failedTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description
You've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to find the sum of lengths of all 12 edges of this parallelepiped.
Input
The first and the single line contains three space-separated integers — the areas of the parallelepiped's faces. The area's values are positive( > 0) and do not exceed 104. It is guaranteed that there exists at least one parallelepiped that satisfies the problem statement.
Output
Print a single number — the sum of all edges of the parallelepiped.
Sample Input
Input
1 1 1
Output
12
Input
4 6 6
Output
28
由组成一个角的三个面,计算长方形的面积。首先计算三边边长 , 边长a,b,c 三边面积x,y,z 记a*b=x ; a*c=y ; b*c = z ;
可以计算出三边
#include<stdio.h>#include <math.h>int main(){int a, b , c , i , x , y , z , max = 0;scanf("%d %d %d", &a, &b, &c);x = sqrt(a*c/b);y = a / x ;z = b / y ;printf("%d\n", 4*(x+y+z));return 0;}
0 0
- 第17周周赛(大一) --A - Parallelepiped
- 第18周周赛(大一)--A - Dubstep
- 十七周周赛A——Parallelepiped
- 第18周周赛(大一)--D - Prizes, Prizes, more Prizes
- A. Parallelepiped
- 2013暑期第二周周赛大一
- 第17周周一
- 第17周周二
- 第17周周三
- 第17周周四
- SDUT 第12周周赛
- Parallelepiped
- 【SDUT第11周周赛Problem A】SDUT2576——Queen Collisions
- CodeForces 208A/D 18周周赛
- 十八周周赛A题Dubstep
- CodeForces 282A 19周周赛
- AYIT暑假集训大一第一周周六赛 F - 全减为1的次数
- 暑假集训大一第五周周三赛 D - Rescue寻找路径
- Activity专题
- [Jweb] Tomcat 解决编码, 乱码问题
- 微信图文消息回复
- userenv和sys_context函数
- 4Sum
- 第17周周赛(大一) --A - Parallelepiped
- oracle执行计划-Nested Loops (nl)-3
- 在一个JSP页面中包含另一个JSP页面的三种方式
- Android内存优化
- 77. 从说“是”开始
- 入口之争:是APP还是移动搜索
- Matlab画一个局部放大的图中图
- DOM4J的使用(DOM4J对XML的解析即增删改查)
- 童年小诗