题解 | a 乘 b 问题(函数),这题主要是要把整型转换为长整型

a 乘 b 问题(函数)

https://www.nowcoder.com/practice/ab665f78dc15448895573d230c519a1e

class Solution {
public:
    /**
     * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
     *
     * 计算两个参数的乘积
     * @param Number1 int整型 
     * @param Number2 int整型 
     * @return long长整型
     */
    long long aTimesB(int Number1, int Number2) {
        // write code here
        long long int result = (long long)Number1*(long long)Number2;
        return result;
    }
};

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务