#include #define RI register int int main() { int T; scanf("%d", &T); while (T--) { int n, m, p; scanf("%d %d %d", &n, &m, &p); p = 100 - p; int ans = 0; while (n >= m) { int tim = n / m; ans += tim; n -= tim * m; n += tim * (m * p / 100); } printf("%d\n", ans); } return 0; }