GUPTA MECHANICAL

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

Thursday, 26 May 2022

[Solution] Whatsapp Messages CodeChef Solution | CodeChef Problem Solution 2022

Chef recently installed Whatsapp on his mobile device. Currently, he has no unread messages.

Every hour, he receives X messages and he is able to read Y messages out of them. After some time Chef notices that he has several unread messages.

Solution Click Below:-  CLICK HERE

Can you tell him exactly how many unread messages Chef has after Z hours have passed?

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases. The description of the test cases follows.
  • Each test case consists of a single line containing three space-separated integers X,Y, and Z$, denoting the number of messages Chef receives every hour, the number \

  • of messages he reads every hour, the and number of hours that have passed, respectively.

Output Format

  • For each test case, output on a new line a single integer denoting the number of unread messages after Z hours.

Constraints

  • 1T2104
  • 1YX50

No comments:

Post a Comment