Off Campus Job Update
6.44K 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>
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
int main()

(

char name[20];

funcionally for event pas on grocery Gems A certain amount of reward points will be given the user if they use a credit card for the payment Reward points are calculated by the sum of all the add digits of the bill amount for the user.

10

return 0;

9

13

14

15

Write an algorithm which will calculate the reward points for the user based on the bill amount.

16

#include<stdio.h>

17

18

int main()

19

{

20

billAmount, representing the user's bill amount.

21

Output

Print an integer representing the reward points given to the user.

Example

Input:

1234567

Output:

16

23

}

// write output to STDOUT

*/

// Read input from STDIN

scanf("%s", name); printf("Hello %a", name);

11

12

// Warning: Printing unwanted or ill-formatted data to output will c

Input

The input consists of an integer

// Write your code here return 0;
https://t.me/Coding_solution_0