Hvn
07/15/2024, 2:42 PMimport java.math.BigInteger
fun pe16(): Int {
val p: BigInteger = 2.toBigInteger().pow(1000)
return p.toString()
.chars()
.map({ it - '0'.toInt() })
.sum()
}
fun main() {
println("digits sum 2**1000 is ${pe16()}".toUpperCase())
}
I see no existance of JDK since I didn't installed it (not JRE).
So that seems kotlin does not require JDK?
(I searched online but found only this https://discuss.kotlinlang.org/t/does-the-kotlin-compiler-require-a-jdk/2496 and it says "You need JDK", and this also says similar https://www.sololearn.com/en/Discuss/2073812/why-does-kotlin-need-a-jdk-when-it-has-its-own-compiler)CLOVIS
07/15/2024, 2:51 PMkotlinc
does not require a JDK, AFAIK
A JRE is requiredCLOVIS
07/15/2024, 2:54 PMHvn
07/15/2024, 2:57 PMHvn
07/15/2024, 2:58 PMCLOVIS
07/15/2024, 3:13 PM