加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

大数用法--JAVA

发布时间:2020-12-14 03:39:29 所属栏目:大数据 来源:网络整理
导读:import java.util.*;import java.math.BigInteger;import java.io.*;public class Oj{public static void main(String[] args) {Scanner in = new Scanner(System.in);BigInteger a = in.nextBigInteger();BigInteger b = in.nextBigInteger(); BigInteger c
import java.util.*;
import java.math.BigInteger;
import java.io.*;
public class Oj
{
	public static void main(String[] args) 
	{
		Scanner in = new Scanner(System.in);
		BigInteger a = in.nextBigInteger();
		BigInteger b = in.nextBigInteger();
	    BigInteger c = a.add(b);// a+b
		BigInteger c = a.subtract(b);//a-b 
		BigInteger c = a.multiply(b);//a*b
		BigInteger c = a.divide(b);//a/b	
		BigInteger c = a.mod(b);//a%b
        BigInteger c = a.max(b);
		BigInteger c = a.min(b);
		System.out.println(c);
	}
}
/*基本方法*/
BigInteger a = BigInteger.valueof( 100 ); //赋值
int compareTo(BigInteger a);// 等于a返回0,小于a返回负数,大于a返回正数
static BigInteger.ONE;      //静态常量1
static BigInteger.ZERO;   

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读