Run ID:101769
提交时间:2024-12-18 19:12:50
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n; int a[100]; int y=0; for(int i=0;i<10000;i++){ cin>>n; if(n=="eof"){ break; } a[i]=n; } for(int o=0;o<i;o++){ for(int u=0;u<a[o];u++){ y=y+u; } } cout<<y; return 0; }