#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T; cin >> T; while(T--) { int n, m, p; cin >> n >> m >> p; p = 100 - p; long long ans = 0; while(n >= m) { int x = n / m; ans += x; n = n % m + x * (m * p / 100); } cout << ans << '\n'; } return 0; }