Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701
lime 849
0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0

include <iostream>

include <string>

include <algorithm>

int main() {

int n, k;

std::cin >> n >> k;

std::string number = std::to_string(n);

int numDigits = number.length();

if (k >= numDigits) {

std::cout << "0" << std::endl;

} else {

std::sort(number.begin(), number.end(), std::greater<char>());

number = number.substr(0, numDigits - k);

std::cout << number << std::endl;

}

return 0;

}

37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701
quoccuongtrannguyen1
Trần Nguyễn Quốc Cường
0 0

hi mn

37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701
vyto2010 925
Tô Triều Vỹ
0 0

New Coder

Skript, C++, Scratch

MC Server dev

37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0
37701 0 0