diff --git a/Problem Statement-1/Solution/Ritish04_gameofcodes_Ps-1 b/Problem Statement-1/Solution/Ritish04_gameofcodes_Ps-1 new file mode 100644 index 0000000..cd2673f --- /dev/null +++ b/Problem Statement-1/Solution/Ritish04_gameofcodes_Ps-1 @@ -0,0 +1,28 @@ +#include + +using namespace std; + +int main() +{ + int t; + cin>>t; + while(t--){ + int n,a,b,k; + cin>>n>>a>>b>>k; + int count,ans=0; + int ar[n]; + for(int i=0;i>ar[i]; + } + for(int i=0;i=k)cout<<"Win"< +using namespace std; + + +bool isPalindrome(string S) +{ + + for (int i = 0; i < n / 2; i++) { + + + + if (S[i] != S[n - i - 1]) { + + return false; + } + } + + return true; +} + + +int main() +{ + int n; + cin>>n; + string S; + cin>>S; + cout << isPalindrome(S); +int depth =0; +while(n%2!=0){ +if((n%2==0)&& (isPalindrome){ +n=n/2; +depth++; +string s1=s; +} + +} +return depth; +cout< +using namespace std; +// Recursive function to return gcd of a and b +int gcd(int a, int b,int arr[]) +{ +// int arr[n]; +// for(i=0;i>arr[i]; +// } +int i=0; +a=arr[i]; + b=arr[i+1]; + if (a == 0) + return b; + if (b == 0) + return a; + + if (a == b) + return a; + + if (a > b) + return gcd(a-b, b,arr); + return gcd(a, b-a,arr); +} + +int main() +{ + int n; + int i; + cin>>n; + int arr[n]; + int count=0; +// for(i=0;i>arr[i]; +// } + int a,b; + for( i=0;i