UVa 11479 - Is this the easiest problem?
2013-10-12 00:49
531 查看
题目:给出三角形三边判断所属集合。
分析:简单题。直接判断即可。
注意:数据可能有负数、使用long long类型。
分析:简单题。直接判断即可。
注意:数据可能有负数、使用long long类型。
#include <iostream> #include <cstdlib> #include <cstdio> using namespace std; int main() { int t; long long a,b,c; while ( cin >> t ) for ( int i = 1 ; i <= t ; ++ i ) { cin >> a >> b >> c; printf("Case %d: ",i); if ( a > 0 && a == b && b == c ) printf("Equilateral\n"); else if ( a > 0 && b > 0 && c > 0 ) { if ( a == b && a+b > c || b == c && b+c > a || a == c && a+c > b ) printf("Isosceles\n"); else if ( a+b <= c || a+c <= b || b+c <= a ) printf("Invalid\n"); else printf("Scalene\n"); }else printf("Invalid\n"); } return 0; }
相关文章推荐
- UVA11479 Is this the easiest problem?【三角形判定+数学】
- [结题报告]11479 - Is this the easiest problem? Time limit: 1.000 seconds
- [解题报告]Is this the easiest problem?
- This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numb
- Typically this problem occurs when you are putting in a data that is too long for the column. In t
- Fix the problem:xxx is not in the sudoers file.This incident will be reported
- A Problem is Preventing Windows from Accurately Checking the License for this Computer
- HUNNU11354:Is the Name of This Problem
- npm启动一个项目(问题:1.express不是内部或外部命令 2.This is most likely a problem with the angular-recommended package
- HUNNU11354:Is the Name of This Problem
- Node.js Setup:This may indicate a problem with this package. The error code is 2503.
- HDU 4627 There are many unsolvable problem in the world.It could be about one or about zero.But this time it is about bigger number.
- The call to LoadLibrary(YourExtensionName) failed, Win32 error 0n14001, “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.”
- Is the Name of This Problem
- This is the first problem
- How to solve "The installation source for this product is not available" problem?
- FCKeditor出现"this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx"错误的解决办法
- UVa 10025 - The ? 1 ? 2 ? ... ? n = k problem
- This version of the rendering library is more recent than your version of ADT plug-in. Please update
- UVa 10245 - The Closest Pair Problem