We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba8860a commit dcbd30cCopy full SHA for dcbd30c
472A - Design Tutorial Learn from Math.cpp
@@ -0,0 +1,36 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+#define ll long long
5
+bool mark[1000001];
6
+
7
+// Code Written By: Vikash Patel
8
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
9
10
+void solv(){
11
+ for(ll i = 2; i <=1000000; i++ )
12
+ {
13
+ if( mark[i] == 0 )
14
15
+ for(ll j = 2 * i; j <=1000000; j += i )
16
+ mark[j] = 1;
17
+ }
18
19
+}
20
21
+int main()
22
+{
23
+ long long i,x;
24
+ solv();
25
+ while(cin>>x)
26
27
+ for(i=4;i<=x-4;i++){
28
+ if(mark[i]==1 && mark[x-i]==1)
29
30
+ cout<<i<<" "<<x-i<<endl;
31
+ break;
32
33
34
35
+ return 0;
36
0 commit comments