Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,i,j,c=0,z,y=0;
- cin>>n;
- if(n%2!=0)
- {
- z=n-3;
- y=(z/2);
- c=y+1;
- }
- else
- {
- y=n/2;
- c=y;
- }
- cout<<c<<endl;
- for(i=1; i<=y; i++)
- {
- cout<<"2"<<' ';
- }
- if(n%2!=0)
- cout<<"3";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement