using namespace std;int main(){ int x,y[size],a[size],n; int t; cin>>t; for(int i=1;i<=t;i++) { int k=0; cin>>a[i]; for(x=1;x<=a[i];x++) { y[x]=(a[i]/x); k=(k+(y[x]*x)); } cout<<(k%max); } return 0;}
Which problem are you trying to solve? Please use code tags when posting code.