7 条题解

  • 1
    @ 2025-9-10 13:57:23
    #include <iostream>
    using namespace std;
    int n, a, s;
    int main()
    {
    	while(1)
    	{
    		cin >> n;
    		if(!n)
    			return 0;
    		s = 0;
    		while(n --)
    		{
    			cin >> a;
    			s += a;
    		}
    		cout << s << endl;
    	}
    	return 0;
    }
    

    信息

    ID
    986
    时间
    1000ms
    内存
    32MiB
    难度
    2
    标签
    递交数
    371
    已通过
    216
    上传者