問題不在BigInt, 是右邊那個字面量無法求值.
scala> 1881676371789154860897069000 <console>:1: error: integer number too large 1881676371789154860897069000
BigInt可以用字串初始化
scala> BigInt("12345667890087234578023089723457234705892375071881676371789154860897069000") res0: scala.math.BigInt = 12345667890087234578023089723457234705892375071881676371789154860897069000
問題不在BigInt, 是右邊那個字面量無法求值.
BigInt可以用字串初始化