#include using namespace std; int main () { int T; scanf("%d", &T); while (T--) { int n, m, p; scanf("%d%d%d", &n, &m, &p); if (n < m) { printf("0\n"); continue; } int re = m - m * (100 - p) / 100; int l = 1, r = 2 * n; while (l < r) { int mid = l + r + 1 >> 1; if (n - re * (mid - 1) >= m && n - re * mid >= 0) l = mid; else r = mid - 1; } printf("%d\n", l); } return 0; }