NYOJ803 A/B Problem【大数】
2014-04-04 23:28
260 查看
原题链接
import java.util.Scanner;
import java.math.BigInteger;
public class Main{
public static void main(String[] args){
Scanner cin = new Scanner(System.in);
BigInteger a, b;
String sign;
BigInteger[] p;
while(cin.hasNext()){
a = cin.nextBigInteger();
sign = cin.next();
b = cin.nextBigInteger();
p = a.divideAndRemainder(b);
if(sign.charAt(0) == '/') System.out.println(p[0]);
else System.out.println(p[1]);
}
}
}
import java.util.Scanner;
import java.math.BigInteger;
public class Main{
public static void main(String[] args){
Scanner cin = new Scanner(System.in);
BigInteger a, b;
String sign;
BigInteger[] p;
while(cin.hasNext()){
a = cin.nextBigInteger();
sign = cin.next();
b = cin.nextBigInteger();
p = a.divideAndRemainder(b);
if(sign.charAt(0) == '/') System.out.println(p[0]);
else System.out.println(p[1]);
}
}
}
797045 | 长木 | A/B Problem | ![]() Accepted | 43 | 307 | java | 04-04 23:28:51 |
相关文章推荐
- nyoj 803 A/B Problem(大数除小数&&大数求余小数)
- nyoj 803 A/B Problem 【Java大数】
- NYOJ 803 A/B Problem(大数除法)
- nyoj 513 A+B Problem IV 【Java大数】
- NYOJ-803 A/B Problem
- nyoj 524 A-B Problem 【Java大数】
- A - B Problem(nyoj524,大数相等判断)
- NYOJ 524 A-B Problem (字符串&大数)
- nyoj 803 大数问题
- NYOJ 103 A+B Problem II (大数)
- nyoj 803 大数问题
- NYOJ 803 A/B Problem
- nyoj103 A+B Problem II (大数加法)
- nyoj A+B Problem IV【实数a+b】大数
- NYOJ 524 A-B Problem(大数是否相等)
- nyoj-803-A/B Problem
- A/B Problem_ny_803(大数).java
- A/B Problem && 开方数(nyoj 803 && 773)
- NYOJ 880 A+B Problem II(大数加法)
- HDU 1002 A + B Problem II(两个大数相加)