杭电OJ1092

杭电OJ1092

#include <iostream>
using namespace std;

int main()
{
    int t=0,a=0;
    while(1)
    {
        int c=0;
        cin>>t;
        if(t==0)
            break;
        while(t--)
        {
            cin>>a;
            c += a;

        }
            cout <<c<< endl;
    }

    return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_40076972/article/details/86634322