1029 large number of divisions
Base time limit: 4 seconds Space limit: 131072 KB score: 160 Difficulty: 6-level algorithm problem gives 2 large integers a, B, calculates the results of A/b and a Mod. Input
Line 1th: Large number A 2nd row: Large number B (A, a, a <= 100000,a,b >= 0)
Output
Line 1th: A/b 2nd line: a Mod B (a% B)
Input example
9876543211234
Output example
800368209
Topic Link: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1029 Analysis: Learn a simple Java, to experience a wave of Java's cool sense, Java Dafa really good ah! The AC code is given below:
1 ImportJava.math.BigInteger;2 ImportJava.util.Scanner;3 4 5 Public classSSS {6 7 /**8 * @paramargs9 */Ten Public Static voidMain (string[] args) { One //TODO auto-generated Method Stub AScanner in=NewScanner (system.in); - BigInteger A, b; -A=In.nextbiginteger (); theb=In.nextbiginteger (); - System.out.println (A.divide (b)); - System.out.println (A.mod (b)); - } +}
The Nod 1029 Large number Division "Java Large number of mess"