Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

KDEL - Removing digits

Bom loves arithmetic very much. He is currently examining the numbers formed by writing the prime numbers successively. Accordingly, the nth number of this kind is formed by writing the first, second, ..., and up to nth prime number successively. The first few ones are:

2, 23, 235, 2357, 235711, ...

Bom denotes the nth number in the above sequence by an.

Write a program that helps Bom delete k digits from an so that the number formed by the remaining digits is maximized.

Input

A single line containing two integers n and k (1 ≤ n ≤ 50000, k ≥ 0 and k is smaller than the number of digits of an).

Output

Print in a single line the maximum number obtained by deleting exactly k digits from an.

Example

Input
5 4

Output
71

Được gửi lên bởi:Jimmy
Ngày:2008-07-04
Thời gian chạy:0.5s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:Tất cả ngoại trừ: ERL GOSU JS-RHINO NODEJS PERL6 PYPY RUST SED VB.NET
Nguồn bài:VNOI Marathon '08 - Round 5/DivB
Problem Setter: Ngô Minh Đức

hide comments
2021-02-05 09:53:41


Last edit: 2021-02-05 18:11:05
2019-04-01 10:27:29
một đấm ac mọi người ơi
2018-01-11 17:03:42
80đ là j z mọi người
2017-01-27 10:17:12
0.01s và 100 =))
2016-07-23 11:17:36 xin đừng quên tôi
Tham khảo thuật toán và code tại: http://yeulaptrinh.pw/307/kdel-spoj/
2016-03-27 13:20:30 THK6
sàn ngto + tham lam
2016-03-09 14:59:18 Lê Thanh Phú
Ban nao 90: Quen xu ly truong hop dac biet cuoi cung - Chua xoa het k chu so.
2015-12-15 13:22:06 xin đừng quên tôi
bài này hay!
2015-09-08 14:19:03
https://thewizard6296.wordpress.com/2015/09/04/5/
2015-05-21 18:29:00 lucky++
Bài hay.

Last edit: 2015-05-21 18:43:11
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.