We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a3ef88 commit 955d8b5Copy full SHA for 955d8b5
400.nth-digit.1.[nopass].kt
@@ -6,7 +6,7 @@
6
import kotlin.math.pow
7
import kotlin.math.ceil
8
9
-class Solution {
+class Solution_findNthDigit_1 {
10
fun findNthDigit(n: Int): Int {
11
val (count, max) = generateSequence(Pair(0, 0)) { (count, max) ->
12
(count + 1).let { Pair(it, max + (it * 10.toDouble().pow(it) * 0.9).toInt()) }.takeIf { it.second < n }
0 commit comments