import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str1 = sc.next(); int num =sc.nextInt(); sc.close(); char ch[] = str1.toCharArray(); for (int i = 0; i < ch.length;i++) { if(ch[i] < 255){ num = num -1; }else{ num = num -2; } if(num <= 1){ if(ch[i]>255){ break; } if(num<0)break; } System.out.print(ch[i]); } } } |
|