2765amazing number

2765   amazing number

题目描述

Little Y likes numbers very much, especially big numbers.Now give you a integer N.You can swap two digital no more than T times.Please give little Y the biggest number.

输入格式:

Input contains multiple test cases. Each test contains two integers N(0 < N < 10^18) and T(0 <= T <= 10).

输出格式:

Print the biggest number.

输入样例 复制
15 1
1506 2
输出样例 复制
51
6510

说明

26
127
通过提交
时空限制1000ms/64mb
题目来源
评测方式在线评测
题目类型
难        度