#include #ifdef LOCAL #include "./debug.cpp" #else #define debug(...) #define print_line #endif using namespace std; using ll = long long; int main() { int T; cin >> T; while (T--) { ll D, A; cin >> D >> A; while (D--) { ll X; cin >> X; __int128_t Y = X; Y *= 10; Y /= A; if (Y % 10 >= 5) Y += 10 - Y % 10; X = Y / 10; cout << X << ' '; } cout << '\n'; } }