p5703_苹果采购(深基2.例5)
Description
现在需要采购一些苹果,每名同学都可以分到固定数量的苹果,并且已经知道了同学的数量,请问需要采购多少个苹果?
Input
输入两个不超过 1 0 9 10^9 109正整数,分别表示每人分到的数量和同学的人数。
Output
一个整数,表示答案。保证输入和答案都在int范围内的非负整数。
Sample Input
5 3
Sample Output
15
此题很简单,根据题目意思就是每个同学分到固定数量的苹果,即输入的两个数相乘即可得到答案。
#include <cstdio>
using namespace std;
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a*b);
return 0;
}