Chef and Instant Noodles codechef solution- Chef has invented 11-minute Instant Noodles. As the name suggests, each packet takes exactly 11 minute to cook. Chef’s restaurant has XX stoves and only 11 packet can be cooked in a single pan. How many customers can Chef serve in YY minutes if each customer orders exactly 11 packet of noodles?

Chef and Instant Noodles solution codechef

SOLUTION – CLICK HERE

Chef has invented 11-minute Instant Noodles. As the name suggests, each packet takes exactly 11 minute to cook.

Chef’s restaurant has XX stoves and only 11 packet can be cooked in a single pan.

How many customers can Chef serve in YY minutes if each customer orders exactly 11 packet of noodles?

Input Format Chef and Instant Noodles solution codechef

  • The first and only line of input contains two space-separated integers XX and YY — the number of stoves and the number of minutes, respectively.

Output Format

  • Print a single integer, the maximum number of customers Chef can serve in YY minutes

Chef and Instant Noodles solution codechef Constraints

  • 1X,Y10001≤X,Y≤1000

Sample Input 1 

3 7

Sample Output 1 

21

Explanation Chef and Instant Noodles solution codechef

Chef cooks for Y=7Y=7 minutes and can cook X=3X=3 packets per minute, one on each stove.

So, the total number of packets that can be cooked is XY=37=21X⋅Y=3⋅7=21.

Each person orders one packet, so the maximum number of customers that can be served is 2121.

Sample Input 2 

7 8

Sample Output 2 

56

Explanation

Chef cooks for Y=8Y=8 minutes and can cook X=7X=7 packets per minute, one on each stove.

So, the total number of packets that can be cooked is XY=78=56X⋅Y=7⋅8=56.

Each person orders one packet, so the maximum number of customers that can be served is 5656.

SOLUTION – CLICK HERE

Leave a Comment

Your email address will not be published.