/in/foo.cc:1:25: warning: extra tokens at end of #include directive
#include<iostream>using namespace std;int main() { int a[22]; int i=0; while(true) { cin>>a[i]; if(a[i]==0) { break; } i++; } if(i==0) { cout<<0<<endl; return 0; } int Left[22]; for(int j=0;j<i;j++) { int All=0; int h=1; int Left=a[j]; while(true) { Left-=h; if(Left>0) { All+=h*h; h++; } else { All+=h*(Left+h); cout<<a[j]<<" "<<All<<endl; break; } } } return 0;}
^~~~~~~~~
/in/foo.cc:1:9: fatal error: iostream>usin: No such file or directory
#include<iostream>using namespace std;int main() { int a[22]; int i=0; while(true) { cin>>a[i]; if(a[i]==0) { break; } i++; } if(i==0) { cout<<0<<endl; return 0; } int Left[22]; for(int j=0;j<i;j++) { int All=0; int h=1; int Left=a[j]; while(true) { Left-=h; if(Left>0) { All+=h*h; h++; } else { All+=h*(Left+h); cout<<a[j]<<" "<<All<<endl; break; } } } return 0;}
^~~~~~~~~~~~~~~
compilation terminated.