Kotlin login as BigInteger
1 answer
You can do it the same way as in Java :
val scanner = Scanner(System.`in`)
val first = scanner.nextBigInteger()
val second = scanner.nextBigInteger()
print(first + second)
OR you can use readLine()
from kotlin.io
:
val first = BigInteger(readLine())
val second = BigInteger(readLine())
print(first + second)
+9
source to share