Question 4 : Amusement Park

InfyTQ Advantage Coding Round Question 2022-23

Amusement park

In this article we will see InfyTQ Sample Coding question. You will find solution of InfyTQ Coding question in different programming language on this page. 

Problem Statement

Aashay loves to go to WONDERLA , an amusement park. They are offering students who can code well with some discount. Our task is to reduce the cost of the ticket as low as possible.

They will give some k turns to remove the cost of one ticket where the cost of tickets are combined and given as string.Help Aashay in coding as he is not good in programming and get a 50%  discount for your ticket.

Constraints:

  • 1 <= number of tickets <= 10^5
  • 1 <= K <= number of tickets

Input Format for Custom Testing:

  • The first line contains a string,Tickets, denoting the given cost of each ticket.
  • The next line contains an integer, K, denoting the number of tickets that is to be removed.

Sample Cases:

  • Sample Input 1

    203
    3
  • Sample Output 1

    0

2 comments on “Question 4 : Amusement Park”