Algorithm
problem Link : https://www.codechef.com/START97D/problems/RIP2000
Problem
Chef had collected notes of Rs. to pay his total college fees. However, the government banned Rs. notes.
Chef wants to pay the same amount using Rs. notes only. Find the number of notes Chef needs.
Input Format
Each test case consists of a single integer - the number of notes of Rs. that Chef has collected.
Output Format
Output a single integer - the number of Rs. notes needed.
Constraints
Sample 1:
4
16
Explanation:
notes of Rs. make a total of rupees. This is equivalent to notes of Rs. .
Code Examples
#1 Code Example with C Programming
Code -
C Programming
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
void solve()
{
int n;
cin>>n;
cout<<n*4<<endl;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int TC = 1;
//cin >> TC;
//cin.ignore();
while (TC--) solve();
}
Copy The Code &
Try With Live Editor
Input
Output
Demonstration
CodeChef solution RIP2000 - 2000 Codechef solution in C,C++