Professional Documents
Culture Documents
1. Gp ( Done)
7. Numbers Puzzle
9. Moving Apples
11. Penalty
#include <bits/stdc++.h>
int main() {
double second_term;
double third_term;
int n;
cin>>second_term>>third_term>>n;
double a = second_term/r;
cout<<nth_term;
return 0;
https://t.me/techmahindra2021crack
In Python
Coming Soon.....
In C
Coming Soon.....
https://www.youtube.com/c/PappuCareerGuide/
In Python
n=int(input())
bi=bin(n)
bi=int(bi[2:])
x=[]
while(bi>0):
x.append(bi%10)
bi//=10
a=x.count(1)
b=x.index(1)
x.reverse()
c=len(x)-x.index(1)-1
print(a,b,c,sep="#")
In C
Coming Soon.....
https://t.me/techmahindra2021crack
string helper(string s)
{
int arr[26]={0}; // there are 26 alphabets
in the english char
for(int i=0;i<s.length();i++) // loop through
the input string
{
arr[s[i]-97]++; //
to come back with the 0 position
string result="";
{
char ch = 97+i; // add the value of
ASCII value of i = 1 - taking b
result+=ch;
result+=to_string(arr[i]);
return result;
https://t.me/techmahindra2021crack
}
int main() {
string s;
cin>>s;
cout<<helper(s);
return 0;
}
In Python
Coming Soon.....
In C
Coming Soon.....
#include <bits/stdc++.h>
string helper(string s)
{
string result = ""; // answer store string
{
char ch = char((s[i] + 3 - 97)%26 + 97);
result+=ch;
return result;
}
int main() {
string s;
cin>>s;
cout<<helper(s);
return 0;
}
https://t.me/techmahindra2021crack
In C
Coming Soon.....
In Python
Coming Soon.....
https://t.me/placemate
5. Number of Decodings
The solution in Python:
def numDecodings(s):
if not s:
return 0
dp[0] = 1
dp[i] += dp[i - 1]
dp[i] += dp[i - 2]
return dp[len(s)]
https://t.me/techmahindra2021crack
s=input()
print(numDecodings(s))
In C
Coming Soon.....
In c++
Coming Soon.....
https://t.me/freshersoffcampjobs
https://t.me/freshersoffcampjobs
return 0;
#include <stdlib.h>
temp = *x;
*x = *y;
*y = temp;
int i, j;
for(i=0;i<n-1;i++){
swap(&arr[j], &arr[j+1]);
int i;
for(i=0;i<n;i++){
https://t.me/freshersoffcampjobs
int sum=0;
for(int i=n-1;i>0;--i){
sum += abs(arr[i]-arr[i-1]);
}
printf("%d",sum);
int main(){
BubbleSort(arr, n);
//Display(arr,n);
AbsValue(arr,n);
https://t.me/freshersoffcampjobs
9. Moving Apples
// Solved By Pappu Career Guide
https://t.me/techmahindra2021crack
https://t.me/techmahindra2021crack
11. Penalty Solution in C++
https://t.me/techmahindra2021crack
if (a == 0)
return b;
if (gcd(i, n) == 1)
result++;
return result;
int main()
int n;
https://www.youtube.com/c/PappuCareerGuide/
ln = len(st)
rem = 0
rem = num % 11
return rem
st = "3435346456547566345436457867978"
print(remainder(st))
https://www.youtube.com/c/PappuCareerGuide/