diff --git a/Problem Statement-1/Solution/Partha_gameofcodes_Ps-1cpp b/Problem Statement-1/Solution/Partha_gameofcodes_Ps-1cpp new file mode 100644 index 0000000..a48c6f5 --- /dev/null +++ b/Problem Statement-1/Solution/Partha_gameofcodes_Ps-1cpp @@ -0,0 +1,92 @@ +#include + +using namespace std; + +#define ll long long int + +const ll mod = 1e9+7; + +void solve(){ + + + + ll n,k,a,b; + + + + cin>>n>>a>>b>>k; + + + + ll g=__gcd(a,b); + + + + ll lcm=(a*b)/g; + + + + ll tab=n/lcm; + + + + ll ta=(n/a)-tab; + + + + ll tb=(n/b)-tab; + + + + + + + + if((ta+tb)>=k) + + { + + cout<<"Win"<>t; + + + + while(t--) solve(); + + + + return 0; + +} + diff --git a/Problem Statement-2/Solution/Partha_gameofcodes_Ps-2.cpp b/Problem Statement-2/Solution/Partha_gameofcodes_Ps-2.cpp new file mode 100644 index 0000000..9c4192e --- /dev/null +++ b/Problem Statement-2/Solution/Partha_gameofcodes_Ps-2.cpp @@ -0,0 +1,99 @@ +#include + +using namespace std; + +#define ll long long int + +const ll mod = 1e9+7; + +bool palindrome (string s,int r){ + + int i = 0, j = r-1; + + + + while(i>n; + + + + string s; cin>>s; + + + + cout<>t; + + + + while(t--) solve(); + + + + return 0; + +} diff --git a/Problem Statement-3/Solution/Partha_gameofcodes_Ps-3.cpp b/Problem Statement-3/Solution/Partha_gameofcodes_Ps-3.cpp new file mode 100644 index 0000000..4c0201c --- /dev/null +++ b/Problem Statement-3/Solution/Partha_gameofcodes_Ps-3.cpp @@ -0,0 +1,169 @@ +#include + +using namespace std; + +#define ll long long int + +const ll mod = 1e9+7; + +vector v; + +void seive(ll n) + +{ + + bool prime[n+1]; memset(prime, true, sizeof(prime)); + + for (ll p=2; p*p<=n; p++) + + { + + if (prime[p] == true) + + { + + for (ll i=p*p; i<=n; i += p) + + prime[i] = false; + + } + + } + + + + + + for (ll p=2; p<=n; p++){ + + if (prime[p]) { + + v.push_back(p); + + } + + } + +} + +void solve(){ + + + + ll m,x,j,i,y; + + + + i=5; + + x=5; + + j=2; + + y=7; + + + + cin>>m; + + + + vector arr; + + arr.push_back(66); + + arr.push_back(55); + + + + + + while(j>t; + + + + while(t--) solve(); + + + + return 0; + +}