GUPTA MECHANICAL

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

Sunday 5 June 2022

[Solution] Playlist CodeChef Solution | CodeChef Problem Solution 2022

Chef's playlist contains 3 songs named A,B, and C, each of duration exactly X minutes. Chef generally plays these 3 songs in loop, i.e, ABCABCA

Chef went on a train journey of N minutes and played his playlist on loop for the whole journey. How many times did he listen to the song C completely?

Input Format

  • The first line of input will contain a single integer 
Solution Click Below:-  CLICK HERE

  • T, denoting the number of test cases. The description of the test cases follows.
  • Each test case consists of a single line of input, containing two space-separated integers N,X.

Output Format

For each test case, output on a new line the number of times Chef listens 

to the song C completely.

Constraints

  • 1T1000
  • 1N100

No comments:

Post a Comment