MAX_NUM  finding maximum possible number
Given a number n, Find out what max possible number you can make by deleting exactly k digits.
T : no of test cases <= 10^3
1 <= no of digits in n <= 10^5. (n might contain leading zeros)
0 <= k <= n
if value of n is equal to k. then just print a new line.
Input
T: no of test cases
T line follow
every line has
n , k
Output
max possible number
Example
Input:
2
1223 2
8756 2 Output: 23
87
Explanation:
Note that left to right order should be maintained. As in the example given answer is 23 not 32.
hide comments
CKA:
20130529 19:07:56
http://ideone.com/d2N8g4


praveen123:
20130529 18:43:56
@nitish rao, You are removing the leading zeros, you do not have to remove that. Exact number of digit should be printed. 

praveen123:
20130529 18:40:33
@evil_hack: you are printing an extra blank line in every test case. Remove that and enjoy :) 

evil_hack:
20130529 17:34:34
@praveen123 plz check my latest soln.... i cannot figure out any cases where it might be giving WA 

evil_hack:
20130529 17:33:20
@praveen123 I have check for 100's of input and I am getting correct answer.Can you please tell me what is the problem in my solution. 

nitish rao:
20130525 08:38:05
@praveen123 can you please jst check my solution and hint me of where i am going wrong... i was getting WA.. id:9350152..


Shubham Rai:
20130517 18:10:39
Last edit: 20130521 09:51:24 

Ashish Lavania:
20130502 06:48:14
@praveen123 plz check my latest soln.... i cannot figure out any cases where it might be giving WA


akash kumar:
20130502 06:48:14
though it is giving wrong ans continously.. my solution code is 9025689.


majd gda:
20130502 06:48:14
"if value of n is equal to k. then just print a new line."

Added by:  praveen123 
Date:  20130209 
Time limit:  0.407s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  general 