SDUT2525:A-B (模板题)

import java.util.Scanner;
import java.math.*;

public class Main
{

    public static void main(String[] args)
    {
        Scanner ci = new Scanner(System.in);
        BigInteger a;
        BigInteger b;
        while(ci.hasNext())
        {
            a=ci.nextBigInteger();
            b=ci.nextBigInteger();
            System.out.println(a.subtract(b));
        }
        ci.close();
    }

}

SDUT3134:大数取模

import java.util.Scanner;
import java.math.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner cin = new Scanner(System.in);
        while(cin.hasNext())
        {
            BigInteger a,b;
            a=cin.nextBigInteger();
            b=cin.nextBigInteger();
            System.out.println(a.mod(b));
            
        }
        cin.close();
    }

}
 
View Code

相关文章:

  • 2022-12-23
  • 2021-10-16
  • 2021-06-29
  • 2022-12-23
  • 2022-01-09
  • 2021-12-10
  • 2022-12-23
  • 2021-06-23
猜你喜欢
  • 2021-06-25
  • 2021-08-18
  • 2022-02-09
  • 2021-12-24
  • 2022-12-23
  • 2021-06-26
  • 2021-08-15
相关资源
相似解决方案