zoukankan      html  css  js  c++  java
  • hdu 1000+1089~1096 题解

    1000:

    英文题目:

    中文题解:

     题解:

    #include<iostream>
    using namespace std;
    
    int main()
    {
    int a, b;
    int num = 0;
    while (cin >> a >> b)
    {
    num = a + b;
    cout << num << endl;
    }
    system("pause");
    return 0;
    
    }

    1089

    英文题目:

     中文题目:

    题解:

    #include<iostream>
    using namespace std;
    
    int main()
    {
        int a, b;
        while (cin >> a >> b)
        {
            cout << a + b << endl;
        }
    
        system("pause");
        return 0;
    }

    1090

    英文题目:

     中文题目:

     题解:

    #include<iostream>
    using namespace std;
    
    int main()
    {
        int a, b;
        int T;
        cin >> T;
        while (T--)
        {
            cin >> a >> b;
            cout << a + b << endl;
        }
        system("pause");
        return 0;
    }

    1091

    英文题目:

     中文题目:

     题解:

    #include<iostream>
    using namespace std;
    
    int main()
    {
        int a, b;
        while (cin >> a >> b)
        {
            if (a == 0 && b == 0)
            {
                ;
            }else{
    
                cout << a + b << endl;
                }
    
        }
        system("pause");
        return 0;
    }

    1092:

    英文题目:

     中文题目:

     题解:

    #include <stdio.h>
    #include<stdlib.h>
    int main()
    {
        int n, number, sum;
        while (scanf("%d", &n), n)
        {
            sum = 0;
            while (n--)
            {
                scanf("%d", &number);
                sum += number;
            }
            printf("%d
    ", sum);
        }
        system("pause");
        return 0;
    }

    1093

    英文题目:

     中文题目:

     题解:

    #include<iostream>  
    using namespace std;
    int main()
    {
        int num;
        while (cin >> num)
        {
    
            int n;
            while ((num--) && (cin >> n))
            {
                if (n != 0)
                {
                    int i, sum = 0;
                    while ((n--) && (cin >> i))
                    {
                        sum += i;
                    }
                    cout << sum << endl;
                }
                else
                    break;
            }
        }
        system("pause");
        return 0;
    }

    1094

    英文题目:

     中文题目:

     题解:

    #include<iostream>
    using namespace std;
    
    int main()
    {
        int n, num, sum;
        while (cin >> n)
        {
            sum = 0;
            while (n--)
            {
                cin >> num;
                sum += num;
            }
            cout << sum << endl;
        }
    
        system("pause");
        return 0;
    }

    1095

    英文题解:

     中文题解:

     题解:

    #include<iostream>
    using namespace std;
    int main()
    {
        int a, b;
        while (cin >> a >> b)
        {
            cout << a + b << endl << endl;
        }
    
        system("pause");
        return 0;
    }

    1096:

    英文题解:

     中文题目:

     题解:

    #include<iostream>
    using namespace std;
    int main()
    {
        int n, t, mun, sum;
        cin >> n;
        while (n--&&cin>>t)
        {
            sum = 0;
            while (t--)
            {
                cin >> mun;
                sum += mun;
            }
            cout << sum << endl << endl;
    
        }
    
        system("pause");
        return 0;
    }
  • 相关阅读:
    Error Domain=com.google.greenhouse Code=-102
    给分类(Category)添加属性
    Eclipse 4.4(luna) 安装Veloeclipse 2.0.8时报错的问题
    MAVEN常用命令
    Redis之七种武器
    Redis系统性介绍
    Nginx、LVS及HAProxy负载均衡软件的优缺点详解
    Redis介绍以及安装(Linux)
    MYSQL + MHA +keepalive + VIP安装配置(三)--keepalived安装配置
    MYSQL + MHA +keepalive + VIP安装配置(二)--MHA的配置
  • 原文地址:https://www.cnblogs.com/pcdl/p/12233216.html
Copyright © 2011-2022 走看看