华为笔试——第三题 大数相乘
2018-03-22 10:08
344 查看
大数相乘
输入:
-12341234
43214321
输出:
-533318047612114
1、利用BigInteger
2、字符串处理方式:
输入:
-12341234
43214321
输出:
-533318047612114
1、利用BigInteger
public class Main{ public static void main(String[] args) { // TODO Auto-generated method stub Scanner s= new Scanner(System.in); BigInteger n = s.nextBigInteger(); BigInteger m = s.nextBigInteger(); System.out.println(n.multiply(m)); } }
2、字符串处理方式:
相关文章推荐
- 2015年校招--华为上机笔试题--大数相乘
- 华为2016实习生招聘笔试题第三题--和尚挑水
- 华为软件类上机笔试--大数求差
- 华为的两道笔试题:字符串循环移动;大数求余问题
- 华为上机测试题(大数相乘-java)
- 拼多多内推笔试二:数字字符串两个字符串相乘/大数相乘
- 华为入职前测试:大数相乘
- 华为2012校园招聘上机题——大数相乘,两个超过100位的大数相乘C语言
- 拼多多笔试题第一题,大数相乘
- 2012华为招聘上机题——————大数相乘简化计算
- Java笔试题:两个大数相乘
- 华为笔试题:将所给数据分解成质因数相乘形式 如435234=251*17*17*3*2
- 新浪笔试:大数相乘.
- 【笔试面试】大数相乘
- 大数乘法(华为勇敢星第三题)
- 2017.8.1拼多多内推内推笔试题(2)—大数相乘
- 华为OJ机试题目:两个大整数相乘(纯C语言实现两个大整数相乘,两种方法实现大数相乘)
- 华为笔试试题大全–史上最齐全
- 华为机试时第三题由于自己构造链表时间过长,未能按时完成,回去之后弄了出来,如有更为简洁的方法,欢迎大家指教
- 2013九月十月百度人搜,阿里巴巴,腾讯华为小米搜狗笔试面试题