(高精度运算4.7.27)UVA 10494 If We Were a Child Again(大数除法&&大数取余)
package com.njupt.acm; import java.math.BigInteger; import java.util.Scanner; public class UVA_10494 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while(scanner.hasNext()){ BigInteger a = scanner.nextBigInteger(); String str = scanner.next(); BigInteger b = scanner.nextBigInteger(); if(str.equals("/")){ System.out.println(a.divide(b)); }else if(str.equals("%")){ System.out.println(a.mod(b)); } } } }