GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Friday, 10 June 2022

[Solution] Subscriptions CodeChef Solution

[Solution] Subscriptions CodeChef Solution | CodeChef Problem Solution 2022

A new TV streaming service was recently started in Chefland called the Chef-TV.

A group of N friends in Chefland want to buy Chef-TV subscriptions. We know that 6 people can share one Chef-TV subscription. Also, the cost of one Chef-TV subscription is X rupees. Determine the minimum total cost that the group of N friends will incur so that everyone in the group is able to use Chef-TV.

Input Format

  • The first line contains a single integer T — the number of test cases. Then the test 

Solution Click Below:-  CLICK HERE



    • cases follow.
    • The first and only line of each test case contains two integers N and X — the size of the group of friends and the cost of one subscription.

    Output Format

    For each test case, output the minimum total cost that the group will incur so that everyone in the


     group is able to use Chef-TV.

    Constraints

    • 1T1000
    • 1N100

    No comments:

    Post a Comment