10494
java写的,String的比较貌似用"=="不行,要用s.compare是否为0或用s.equals(s`);
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) throws FileNotFoundException { // TODO Auto-generated method stub // File file = new File("a.txt"); Scanner cin = new Scanner(new BufferedInputStream(System.in)); BigInteger a, b; String s; while(cin.hasNext()){ a = cin.nextBigInteger(); s = cin.next(); b = cin.nextBigInteger(); if(s.compareTo("/") == 0)System.out.println(a.divide(b)); // System.out.println(s); else if(s.compareTo("%") == 0)System.out.println(a.mod(b)); // if(s == "/"){ // System.out.println(1); // } // else if(s == "%"){ // System.out.println(a); // } } } }