Count the Notebooks CodeChef Solution

Problem – Count the Notebooks CodeChef Solution

You know that 1 kg of pulp can be used to make 1000 pages and 1 notebook consists of 100 pages.

Suppose a notebook factory receives N kg of pulp, how many notebooks can be made from that?

Input Format

  • First line will contain T, the number of test cases. Then the test cases follow.
  • Each test case contains a single integer N – the weight of the pulp the factory has (in kgs).

Output Format

For each test case, output the number of notebooks that can be made using N kgs of pulp.

Constraints

  • 1≤T≤100
  • 1≤N≤100

Sample 1:

Input: 3
1
100
50
Output: 10
1000
500

Explanation:

Test case-1: 1 kg of pulp can be used to make 1000 pages which can be used to make 10 notebooks.

Test case-2: 100 kg of pulp can be used to make 100000 pages which can be used to make 1000 notebooks.

Test case-3: 50 kg of pulp can be used to make 50000 pages which can be used to make 500 notebooks.

Count the Notebooks CodeChef Solution in C++17

#include <iostream>
using namespace std;

int main() {
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        cout<<n*10<<endl;
    }
	// your code goes here
	return 0;
}

Count the Notebooks CodeChef Solution in Pyth 3

# cook your dish here
t=int(input())
for i in range(t):
    n = int(input())
    print(n*10)

Count the Notebooks CodeChef Solution in Java

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

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

/* 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
	{
		Scanner sc=new Scanner(System.in);
		int T=sc.nextInt();
		for(int i=0;i<T;i++){
		    int N=sc.nextInt();
		    int Y=(N*1000)/100;
		    System.out.println(Y);
		}
	}
}
Count the Notebooks CodeChef Solution Review:

In our experience, we suggest you solve this Count the Notebooks 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 Count the Notebooks CodeChef Solution

Find on CodeChef

Conclusion:

I hope this Count the Notebooks 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.