-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrong_sub.cpp
47 lines (43 loc) · 1.11 KB
/
wrong_sub.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// https://codeforces.com/contest/977/problem/A
// Virtual
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double;
typedef vector<int> vi;
typedef map<int, int> mii;
typedef pair<int, int> pii;
#define s(v) sort(v.begin(), v.end())
#define rev(v) sort(v.rbegin(), v.rend())
#define bs(v, s) binary_search(v.begin(), v.end(), s)
#define minvec(v) *min_element(v.begin(), v.end())
#define maxvec(v) *max_element(v.begin(), v.end())
#define mp make_pair
#define pb(x) push_back(x)
#define fst first
#define sec second
#define foru(i, n, ty, x) for (int i = n; i < ty; i += x)
#define ford(i, n, ty, x) for (int i = n; i >= ty; i -= x)
#define forn(i, ty) foru(i, 0, ty, 1)
void setIO(string name) {
cin.tie(0)->sync_with_stdio(0);
if (name != "") {
freopen((name + ".in").c_str(), "r", stdin);
freopen((name + ".out").c_str(), "w", stdout);
}
}
void solve() {
//code
int n,k; cin >> n >> k;
while(k--) {
if (n % 10 != 0) --n;
else n /=10;
}
cout << n << '\n';
}
int32_t main() {
setIO("");
int t = 1;
// cin >> t;
while(t--) solve();
}