Off Campus Job Update
6.46K subscribers
313 photos
3 videos
22 files
968 links
500+ Placement & Competitive Exam Materials
75+ Companies Materials
100+ JOB Updates in a Month

πŸš€DM for Promotion @Wren_0
πŸš€Placement Updates: @offcampusjobs_0
🌟 Placment Material: @placement_materials0
Download Telegram
#include <stdio.h>
#include <math.h>

int main(void) {
int a, b,c;
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
printf("%d",(int)pow(a,b)%c);
return 0;
}
Telegram- https://t.me/Coding_solution_0
#include<iostream>
using namespace std;
int main()
{
int n,i;
cin>>n;

int arr[n];
for(i=0;i<n;i++)
{
cin>>arr[i];
}

int len = n-1, curr = -1, next = 0, ans = 0;
for (int i = 0; next < len; i++)
{
if (i > curr)
{ ans++, curr = next;
next = max(next, arr[i] + i);
}
}
cout<<ans;
}

C++
Bicycle Racing

πŸ”— Telegram:- https://t.me/Coding_solution_0
#include<iostream>
#include<cmath>
using namespace std;

int main()
{
int n,m,count = 0;
int rangenumber, c = 0, num, i, letest = 0;
cin>>num>>rangenumber;
while (c != rangenumber)
{
count = 0;

for (i = 2; i <= sqrt(num); i++)
{
if (num % i == 0)
{
count++;
break;
}
}
if (count == 0)
{
c++;
letest = num;
}
num = num + 1;
}
cout<<letest;
return 0;
}

πŸ”— Telegram:https://t.me/Coding_solution_0
#include<bits/stdc++.h>
using namespace std;


int main()
{


int a,b,c,d,s;
cin>>a>>b>>c>>d>>s;
int aa[4];
int a1=s/2000;
if(a1>=a)
{
aa[0]=a;
//cout<<a<<" ";
s-=(a*2000);
}
else
{
aa[0]=a;
//cout<<a1<<" ";
s-=(a1*2000);
}
int b1=s/500;
if(b1>=b)
{
aa[1]=b;
//cout<<b<<" ";
s-=(b*2000);
}
else
{
aa[1]=b1;
//cout<<b1<<" ";
s-=(b1*2000);
}
int c1=s/100;
if(c1>=c)
{
aa[2]=c;
//cout<<c<<" ";
s-=(c*2000);
}
else
{
aa[2]=c1;
//cout<<c1<<" ";
s-=(c1*2000);
}
int d1=s/20;
if(d1>=d)
{
aa[3]=d;
//cout<<d<<" ";
s-=(d*2000);
}
else
{
aa[3]=d1;
// cout<<d1<<" ";
s-=(d1*2000);
}
if(s!=0)
cout<<0;
else
cout<<aa[0]<<" "<<aa[1]<<" "<<aa[2]<<" "<<aa[3];
}


ATM MACHINE MINE CODE

πŸ”— Telegram:https://t.me/Coding_solution_0
#include <stdio.h>
int fact(int num){
if(num>1){
return num*fact(num-1);
}
else if(num<=1){
return 1;
} }

int main() {
int n,p,res;
scanf("%d",&n);
scanf("%d",&p);
res = fact(n)/(fact(p)*fact(n-p));
printf("%d",res);

return 0;
}

Pollution code
Telegram -
https://t.me/Coding_solution_0
#include <stdio.h>
int fact(int num){
if(num>1){
return num*fact(num-1);
}
else if(num<=1){
return 1;
} }

int main() {
int n,p,res;
scanf("%d",&n);
scanf("%d",&p);
res = fact(n)/(fact(p)*fact(n-p));
printf("%d",res);

return 0;
}

Pollution code

https://t.me/Coding_solution_0
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 998244353
#define add(x,y) ((x+y)%MOD)
#define mul(x,y) ((x*y)%MOD)
#define sub(x,y) ((MOD+x-y)%MOD)
ll fastpow(ll x, ll y){
ll temp = 1;
while(y){
if(y&1)
temp = mul(temp, x);
x = mul(x, x);
y>>=1;
}
return temp;
}

ll inv(ll x){
return fastpow(x,MOD-2);
}

ll frac[200100];

ll C(ll n, ll i){
return mul(frac[n], inv(mul(frac[i], frac[n-i])));
}

int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);

int n,k;
cin>>n>>k;

if(k>=n){
cout<<0<<endl;
return 0;
}

ll ans = 0;
frac[0] = 1;
for(int i=1;i<=n;++i){
frac[i] = mul(i, frac[i-1]);
}
for(int i=0;i<=n-k;++i){
ll temp = mul(C(n-k,i), fastpow(n-k-i,n));
if(i&1)
ans = sub(ans, temp);
else
ans = add(ans,temp);
}

ans = mul(ans, C(n, n-k));
if(k)
ans = mul(ans, 2);
cout<<ans<<endl;
}

CHESS GAME CODE

Telegram - https://t.me/Coding_solution_0
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>




int main(){
int t,count=0;
scanf("%d",&t);
for(int a0 = 0; a0 < t; a0++){
count=0;
int n;
int k;
scanf("%d %d",&n,&k);
int a[n];
for(int a_i = 0; a_i < n; a_i++){
scanf("%d",&a[a_i]);
}

for(int a_i = 0; a_i < n; a_i++){
if(a[a_i]<=0)
count++;
}
if(count<k)
printf("YES\n");
else
printf("NO\n");
//count=0;
}
return 0;
}


C language
Angry professor
Telegram- https://t.me/Coding_solution_0
// C++ program to find minimum time
// required to produce m items.
#include<bits/stdc++.h>

using namespace std;

// Return the minimum time required to
// produce m items with given machines.

int minTime(int arr[], int n, int m)
{

// Initialize time, items equal to 0.

int t = 0;


while (1)

{

int items = 0;


// Calculating items at each second

for (int i = 0; i < n; i++)

items += (t / arr[i]);


// If items equal to m return time.

if (items >= m)

return t;


t++; // Increment time

}
}

// Driver Code

int main()
{

int arr[] = { 1, 2, 3 };

int n = sizeof(arr)/sizeof(arr[0]);

int m = 11;


cout << minTime(arr, n, m) << endl;


return 0;
}


Minimum time

C language
Telegram-
https://t.me/Coding_solution_0
Angry professor


#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>




int main(){
int t,count=0;
scanf("%d",&t);
for(int a0 = 0; a0 < t; a0++){
count=0;
int n;
int k;
scanf("%d %d",&n,&k);
int a[n];
for(int a_i = 0; a_i < n; a_i++){
scanf("%d",&a[a_i]);
}

for(int a_i = 0; a_i < n; a_i++){
if(a[a_i]<=0)
count++;
}
if(count<k)
printf("YES\n");
else
printf("NO\n");
//count=0;
}
return 0;
}


C language

Telegram- https://t.me/Coding_solution_0
#include"stdio.h"
void main() {
int n;
scanf("%d", &n);
if (n >= 30 && n <= 50)
printf("D");
elseif(n >= 51 && n <= 60)
printf("C");
elseif(n >= 61 && n <= 80)
printf("B");
elsif(n >= 81 && n <= 100)
printf("A")
}

C language
E-Commerce Code
Wipro
Telegram -
https://t.me/Coding_solution_0
Warehouse Ecommerce company

#include <stdio.h>
#include <string.h>
int main() {
char s[100];
int i;
printf("\nEnter a string : ");
gets(s);
for (i = 0; s[i]!='\0'; i++) {
if(s[i] >= 'a' && s[i] <= 'z') {
s[i] = s[i] - 32;
}
}
printf("\nString in Upper Case = %s", s);
return 0;
}

Warehouse Code

Telegram- https://t.me/Coding_solution_0
#include<stdio.h>
#include<math.h>

int isPerfectSquare(int number)
{
int iVar;
float fVar;

fVar=pow(number,1.0/3.0);
iVar=(int)fVar;

if(iVar==fVar)
return number;
else
return 0;
}

int main()
{
int n;
scanf(β€œ%d”,&n);
int arr[n];
int i;
for(i = 0; i < n; i++)
{
scanf("%d",&arr[i]);
}
int count = 0;
for(i = 0; i < n; i++)
{
if(isPerfectSquare(arr[i]))
count++;
}
printf("%d",count);
return 0;
}

E-Commerce

Telegram-
https://t.me/Coding_solution_0
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n<100 || n>200){
cout<<"INVAILD INPUT";
return 0;
}
if(n%2==0){
int div=n/4;
for (int i=0;i<4;i++){
cout<<div<<endl;
}
}
else{
int div=n/4;
int temp=n-(div*3);


for (int i=0;i<3;i++){
cout<<div<<endl;
}
cout<<temp;
}
}

C++

TCS exam

Telegram
https://t.me/Coding_solution_0
#include<bits/stdc++.h>
using namespace std;

int main(){
int n ;
cin>>n;
vector<int>a(n);
vector<int>b(n);
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=0;i<n;i++)
cin>>b[i];
int ans=1;
for(int i=0;i<n;i++)
{
int temp=1;
for(int j=i+1;j<n;j++)
{
if((a[i]>=a[j] && a[i]<=b[j]) || (a[j]>=a[i] && a[j]<=b[i] ))
temp++;
}
ans= max(ans,temp);
}
cout<<ans;
return 0;
}


Python
Courth house Codeβœ…βœ…
Telegram
http://t.me/Coding_solution_0
http://t.me/Coding_solution_0
http://t.me/Coding_solution_0
#include <stdio.h>
int fact(int num){
if(num>1){
return num*fact(num-1);
}
else if(num<=1){
return 1;
} }

int main() {
int n,p,res;
scanf("%d",&n);
scanf("%d",&p);
res = fact(n)/(fact(p)*fact(n-p));
printf("%d",res);

return 0;
}

Pollution code
https:
http://t.me/Coding_solution_0
#include<stdio.h>
#include<math.h>

int isPerfectSquare(int number)
{
int iVar;
float fVar;

fVar=pow(number,1.0/3.0);
iVar=(int)fVar;

if(iVar==fVar)
return number;
else
return 0;
}

int main()
{
int n;
scanf(β€œ%d”,&n);
int arr[n];
int i;
for(i = 0; i < n; i++)
{
scanf("%d",&arr[i]);
}
int count = 0;
for(i = 0; i < n; i++)
{
if(isPerfectSquare(arr[i]))
count++;
}
printf("%d",count);
return 0;
}

E-Commerce

βœ… All cases passed no complicated errors ❀️
Wipro Solution Available HereπŸš€πŸš€
https://t.me/Coding_solution_0
https://t.me/Coding_solution_0