Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Shopping Change CodeChef Solution

Problem – Shopping Change CodeChef Solution

Chef went shopping and bought items worth X rupees (1≤X≤100). Unfortunately, Chef only has a single 100 rupees note.

Since Chef is weak at maths, can you help Chef in calculating what money he should get back after paying 100 rupees for those items?

Input Format

  • First line will contain T, the number of test cases. Then the test cases follow.
  • Each test case consists of a single line containing an integer X, the total price of items Chef purchased.

Output Format

For each test case, output in a single line the money Chef has to receive back.


  • 1≤T≤100
  • 1≤X≤100

Sample 1:

Input: 3
Output: 99


Test case-1: Since chef paid 100 rupees for items worth 1 rupee. He should get back 99 rupees.

Test case-2: Since chef paid 100 rupees for items worth 25 rupees. He should get back 75 rupees.

Shopping Change CodeChef Solution in C++17

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int T;
	    int X;
	return 0;

Shopping Change CodeChef Solution in Pyth 3

# cook your dish here
for i in range(n):

Shopping Change CodeChef Solution in Java

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
	public static void main (String[] args) throws java.lang.Exception
		// your code goes here
		Scanner sc = new Scanner(;
		int t = sc.nextInt();
		    int x = sc.nextInt();
Shopping Change CodeChef Solution Review:

In our experience, we suggest you solve this Shopping Change CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.

If you are stuck anywhere between any coding problem, just visit Queslers to get the Shopping Change CodeChef Solution

Find on CodeChef


I hope this Shopping Change CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published. Required fields are marked *