| 14 | #define ll long long |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | int testCases; |
| 19 | cin >> testCases; |
| 20 | while (testCases--) |
| 21 | { |
| 22 | ll n, k; |
| 23 | cin >> n >> k; |
| 24 | ll p, s = 0; |
| 25 | for (int i = 0; i < n; ++i) |
| 26 | { |
| 27 | cin >> p; |
| 28 | if (p > k) |
| 29 | { |
| 30 | s += p - k; |
| 31 | } |
| 32 | } |
| 33 | cout << s << '\n'; |
| 34 | } |
| 35 | |
| 36 | return 0; |
| 37 | } |
nothing calls this directly
no outgoing calls
no test coverage detected