zoukankan      html  css  js  c++  java
  • hdu 2393 Higher Math

    Higher Math

                                                                                     Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)

                                                                                                     Total Submission(s): 2291    Accepted Submission(s): 1262

    #include<iostream>
    #include<cstdio>
    #include<cstring>
    #include<algorithm>
    using namespace std;
    int max(int a,int b)
    {
        int T;
        if(a>b)
        {
            T=a;
            a=b;
            b=T;
        }
        return b;
    }
    
    int main()
    {
        __int64 a[5];
        int cas;
        cin>>cas;
        int t=1;
        while(cas--)
        {
            cin>>a[1]>>a[2]>>a[3];
            cout<<"Scenario #"<<t<<":"<<endl;
            if(a[1]&&a[2]&&a[3])
            {
                sort(a+1,a+4);
             if(a[3]*a[3]==a[2]*a[2]+a[1]*a[1])
                    cout<<"yes"<<endl<<endl;
              else
                cout<<"no"<<endl<<endl;
            }
            else
                cout<<"no"<<endl<<endl;
    
          t++;
        }
    
        return 0;
    }
    


  • 相关阅读:
    创建进程
    进程
    操作系统历史
    socket
    网络基础
    常用模块二:hashlib、configparser、logging
    常见正则匹配
    类中的内置方法(魔法方法、双下方法)
    反射、isinstance和issubclass
    封装、继承、多态
  • 原文地址:https://www.cnblogs.com/wzzkaifa/p/7353407.html
Copyright © 2011-2022 走看看