1 solutions
-
0
#include<iostream> #include<bits/stdc++.h> using namespace std; int judge(int x , int y , int z){ int flag = 0; if(x+y>z&&x+z>y&&z+y>x){ flag = 1; }else{ flag = 0; } return (flag); } int main() { int a[3]; for(int i = 0 ;i < 3 ;i++){ cin >> a[i]; } sort(a,a+3); if(judge(a[0],a[1],a[2])==1){ if(a[0]*a[0] + a[1]*a[1] < a[2]*a[2]){ cout << "dunjiao"; } if(a[0]*a[0] + a[1]*a[1] == a[2]*a[2]){ cout << "zhijiao"; } if(a[0]*a[0] + a[1]*a[1] > a[2]*a[2]){ cout << "ruijiao"; } }else{ cout << "no"; } return 0; }
- 1
Information
- ID
- 350
- Time
- 1000ms
- Memory
- 16MiB
- Difficulty
- 6
- Tags
- # Submissions
- 149
- Accepted
- 42
- Uploaded By