We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fca7a3 commit 31de8dbCopy full SHA for 31de8db
749A - Bachgold Problem.cpp
@@ -0,0 +1,35 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+
4
+// Code Written By: Vikash Patel
5
6
+int main()
7
+{
8
+ int n;
9
+ cin>>n;
10
+ if(n%2==0)
11
+ {
12
+ cout<<n/2<<endl;
13
+ for(int i=1;i<=n/2;i++)
14
15
+ cout<<2<<" ";
16
+ }
17
18
+ else
19
20
+ cout<<(n-3)/2+1<<endl;
21
+ for(int i=1;i<=(n-3)/2;i++)
22
23
24
25
+ cout<<3;
26
27
+}
28
29
30
31
32
33
34
35
0 commit comments