#define _DEBUG 0 #if _DEBUG #endif #include #include int main(void) { int scan;//scanf警告用 unsigned long long ans=0; long long i, j; unsigned long long s;scan=scanf("%llu",&s); unsigned long long t=s; unsigned long long n; int count=0; while(1) { n=sqrt(s); s-=n*n;count++; if(s<4)break; } printf("%d\n",count+s); while(1) { n=sqrt(t); t-=n*n; printf("%llu ",n*n); if(t<4)break; } while(t--) { printf("1 "); } return 0; }