fork(9) download
  1. import java.math.BigDecimal;
  2. import java.math.BigInteger;
  3. import java.text.DecimalFormat;
  4. import java.text.NumberFormat;
  5. import java.util.Locale;
  6.  
  7. /* The class name doesn't have to be Main, as long as the class is not public. */
  8. class Main
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. NumberFormat nf = NumberFormat.getNumberInstance(new Locale("pt", "PT"));
  13. df.setParseBigDecimal(true);
  14. BigDecimal decimal = (BigDecimal)df.parse("12.090.129.019.201.920.192.091.029.102.901.920.192.019.201.920");
  15. BigInteger big = decimal.toBigInteger();
  16. System.out.println(big);
  17. }
  18. }
Success #stdin #stdout 0.05s 246080KB
stdin
Standard input is empty
stdout
12090129019201920192091029102901920192019201920