|
|
back to boardhelp me, find mistake, 5 test #include <bits/stdc++.h> using namespace std; #define int long long signed main() { ios_base::sync_with_stdio(false); cout.tie(0); cin.tie(0); int n,k; cin >> n >> k; int dontused=0,dontdie=0; int f; for(int i=0;i<n;i++) { cin >> f; if(k>f) { dontdie+=k-f; } if(k<f) { dontused+=f-k; } } cout << dontused << " " << dontdie; return 0; } |
|
|