//#include //#include //#include #include #include #include #include #include #include #include #include #include #include #include #include #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define deg(x) cout<< #x"=" << (x) << endl; #define degg(x,y) cout<< #x"="<< (x) <<","<< #y"="<< (y) < pii; typedef pair pll; typedef priority_queue,greater > xqueue; typedef priority_queue dqueue; //typedef tree,rb_tree_tag,tree_order_statistics_node_update> x_rb; //typedef tree,rb_tree_tag,tree_order_statistics_node_update> d_rb; const ll INF=9e18; const int inf=2147483647; ll qpow(ll a,ll b,ll mod) { ll r=1; for(; b; b>>=1) { if(b&1) r=(r*a)%mod; a=(a*a)%mod; } return r; } const int N=1e5+5; void work() { IOS; int t; cin>>t; while(t--) { int n,m,p; cin>>n>>m>>p; ll cnt=0; while(n>=m) { ll d=n/m; cnt+=d; ll ct=m*d; n-=ct; ll save=(m*(100-p))/100; n+=d*save; } ac(cnt); } } int main() { #ifdef Local freopen("1.txt","r",stdin); #endif // mm work(); return 0; }