Advertisement
erfanul007

Light OJ 1053

Dec 29th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5. long long int t,i,a,b,c,temp,x,y;
  6. scanf("%lld",&t);
  7. for(i=1;i<=t;i++){
  8. scanf("%lld %lld %lld",&a,&b,&c);
  9. if(a>b && a>c){
  10. temp=a;
  11. a=c;
  12. c=temp;
  13. }
  14. else if(b>a && b>c){
  15. temp=b;
  16. b=c;
  17. c=temp;
  18. }
  19. x=(a*a)+(b*b);
  20. y=c*c;
  21. if(x==y)
  22. printf("Case %lld: yes\n",i);
  23. else
  24. printf("Case %lld: no\n",i);
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement