int main()
{
int n;
cin >> n;
int i;
for(i = 0; i < n; i++){
int money, price;
int num;
cin >> money >> price;
num = money / price;
int tmp1 = num / 3;
int tmp2 = 2 * num / 5;
if(tmp1 > tmp2){
num = num + tmp1;
}else{
num = num + tmp2;
}
cout << num << endl;
}
return 0;
}
奇怪
include
include
using namespace std;
int main()
{
int n;
cin >> n;
int i;
for(i = 0; i < n; i++){
int money, price;
int num;
cin >> money >> price;
num = money / price;
int tmp1 = num / 3;
int tmp2 = 2 * num / 5;
if(tmp1 > tmp2){
num = num + tmp1;
}else{
num = num + tmp2;
}
cout << num << endl;
}
return 0;
}