# Codechef Practice | Week 3

## 1. Enormous Input Test: INTEST

``````// THIS code starts from INT MAIN so copy paste from here only

#include<iostream>
using namespace std;

int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);

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

int count=0;
for (int i=0;i <=n-1;i++)
{
int a;
cin >> a;
if (a%k==0)
{
count++;
}
}

cout << count << endl;
return 0;
}``````

## 2. Decrement OR Increment : DECINC

``````#include <iostream>
using namespace std;

int main() {
int n;
cin>>n;

if(n%4==0)
cout << n+1 << endl;
else
cout << n-1 << endl;
return 0;
}
``````

## 3. Chef And Operators: CHOPRT

``````#include <iostream>
using namespace std;

int main() {
int t , x ,y ;
cin >>t ;
while(t--) {
cin >> x >>y ;
if ( x >y )
cout << ">" << endl ;
else if ( x < y )
cout << "<" << endl ;
else
cout << "=" << endl ;
}
return 0;
}
``````

## 4. Sum OR Difference: DIFFSUM

``````#include <iostream>
using namespace std;

int main() {
int a,b;
cin>>a>>b;
if(a>b)
cout << a-b;
else
cout << a+b;
return 0;
}
``````

## 5. ATM Problem : HS08TEST

``````#include<iostream>
using namespace std;

int main() {
int w;
float ac_bl;
cin>>w;
cin>>ac_bl;
if(w%5==0 && w < =ac_bl-0.5){
cout << ((ac_bl-w)-(0.5));
}
else{
cout << ac_bl;
}
return 0;
}``````

KUIZZER Helping Educational website for Youngers

Welcome To Kuizzer!

KUIZZER - Helping Educational Website for YoungersYour Post is going to visible like this

Here, Your Promotional Details are going to visible for others whenever they visit the site !

Looks like you are using an ad-blocking browser extension. We request you to whitelist our website on the ad-blocking extension and refresh your browser to view the content.

Check out our merchandise, available at kuizzer.in

X
0