P5703 【深基2.例5】苹果采购

题目描述

现在需要采购一些苹果,每名同学都可以分到固定数量的苹果,并且已经知道了同学的数量,请问需要采购多少个苹果?

输入格式

输入两个不超过 10^9109 正整数,分别表示每人分到的数量和同学的人数。

输出格式

一个整数,表示答案。保证输入和答案都在int范围内的非负整数

输出输入样例

输入:5 3

输出:15

import java.util.*;
public class Main{
    public static void main(String[] args) {
        // TODO 自动生成的方法存根
    Scanner in=new Scanner(System.in);
int a=in.nextInt();
     int b=in.nextInt();
     int c=0;
     if(a>0)
     {
         if(b>0)
         {
            c=a*b;
         }
     }
     System.out.println(c);
    }
}

 

 


 

posted @ 2020-03-31 12:06  今天喝奶茶了吗  阅读(418)  评论(0)    收藏  举报