From c52b36c6a37fdb1d1de146d3939cb42e2c691f44 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sat, 5 Nov 2022 01:28:02 +0200 Subject: Solved 6 problem in filtrationContest and restructured the repo --- codeforces/ParanormixPredictions/inp | 0 codeforces/ParanormixPredictions/main | Bin 0 -> 32368 bytes codeforces/ParanormixPredictions/main.cpp | 25 ++++++++++++++++++++++ codeforces/ParanormixPredictions/main_input0.txt | 1 + codeforces/ParanormixPredictions/main_input1.txt | 1 + codeforces/ParanormixPredictions/main_input2.txt | 1 + codeforces/ParanormixPredictions/main_output0.txt | 1 + codeforces/ParanormixPredictions/main_output1.txt | 1 + codeforces/ParanormixPredictions/main_output2.txt | 1 + 9 files changed, 31 insertions(+) create mode 100644 codeforces/ParanormixPredictions/inp create mode 100755 codeforces/ParanormixPredictions/main create mode 100644 codeforces/ParanormixPredictions/main.cpp create mode 100644 codeforces/ParanormixPredictions/main_input0.txt create mode 100644 codeforces/ParanormixPredictions/main_input1.txt create mode 100644 codeforces/ParanormixPredictions/main_input2.txt create mode 100644 codeforces/ParanormixPredictions/main_output0.txt create mode 100644 codeforces/ParanormixPredictions/main_output1.txt create mode 100644 codeforces/ParanormixPredictions/main_output2.txt (limited to 'codeforces/ParanormixPredictions') diff --git a/codeforces/ParanormixPredictions/inp b/codeforces/ParanormixPredictions/inp new file mode 100644 index 0000000..e69de29 diff --git a/codeforces/ParanormixPredictions/main b/codeforces/ParanormixPredictions/main new file mode 100755 index 0000000..eddd98f Binary files /dev/null and b/codeforces/ParanormixPredictions/main differ diff --git a/codeforces/ParanormixPredictions/main.cpp b/codeforces/ParanormixPredictions/main.cpp new file mode 100644 index 0000000..771fafc --- /dev/null +++ b/codeforces/ParanormixPredictions/main.cpp @@ -0,0 +1,25 @@ +#include + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int n, m; + cin >> n >> m; + vector primes; + for(int i = 2; i <= 50;i++) { + bool ok = 1; + for(int j = 2; j * j <= i; j++) { + if(i % j == 0) { + ok = 0; + break; + } + } + if(ok) { + primes.push_back(i); + } + } + int indx = (upper_bound(primes.begin(), primes.end(), n) - primes.begin()); + (m == primes[indx]) ? cout << "YES" : cout << "NO"; +} diff --git a/codeforces/ParanormixPredictions/main_input0.txt b/codeforces/ParanormixPredictions/main_input0.txt new file mode 100644 index 0000000..99818b5 --- /dev/null +++ b/codeforces/ParanormixPredictions/main_input0.txt @@ -0,0 +1 @@ +3 5 diff --git a/codeforces/ParanormixPredictions/main_input1.txt b/codeforces/ParanormixPredictions/main_input1.txt new file mode 100644 index 0000000..156c178 --- /dev/null +++ b/codeforces/ParanormixPredictions/main_input1.txt @@ -0,0 +1 @@ +7 11 diff --git a/codeforces/ParanormixPredictions/main_input2.txt b/codeforces/ParanormixPredictions/main_input2.txt new file mode 100644 index 0000000..a5b6096 --- /dev/null +++ b/codeforces/ParanormixPredictions/main_input2.txt @@ -0,0 +1 @@ +7 9 diff --git a/codeforces/ParanormixPredictions/main_output0.txt b/codeforces/ParanormixPredictions/main_output0.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/codeforces/ParanormixPredictions/main_output0.txt @@ -0,0 +1 @@ +YES diff --git a/codeforces/ParanormixPredictions/main_output1.txt b/codeforces/ParanormixPredictions/main_output1.txt new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/codeforces/ParanormixPredictions/main_output1.txt @@ -0,0 +1 @@ +YES diff --git a/codeforces/ParanormixPredictions/main_output2.txt b/codeforces/ParanormixPredictions/main_output2.txt new file mode 100644 index 0000000..5e35d1b --- /dev/null +++ b/codeforces/ParanormixPredictions/main_output2.txt @@ -0,0 +1 @@ +NO -- cgit v1.2.3