题目:
小蓝要到店里买铅笔。
铅笔必须一整盒一整盒买,一整盒 12 支,价格 p 元。
小蓝至少要买 t 支铅笔,请问他最少花多少钱?
我的答案:
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
int a,b,c,d,e;
cin >> a >> b;
if(b/12==0)
cout << (b/12)*a << endl;
else
cout << (b/12+1)*a << endl;
return 0;
}
我哪里做错了啊