1 0 0 1 题
本来 计算每一次真正花费掉的钱cost 时写的是注释掉的那一句,但是WA了
后来改成了现在这一句就AC了.
不太懂…太狗了…
#include <bits/stdc++.h>
using namespace std;
int test, n, m, p;
int main()
{
scanf("%d", &test);
while(test--){
scanf("%d%d%d", &n, &m, &p);
int ans=0;
//double cost=m-(int)(m*(1-p*0.01));
double cost=m-(int)(m*(100-p)/100.0);
while(n>=m) { n-=cost; ans++;}
cout<<ans<<endl;
}
//system("pause");
return 0;
}