|
|
back to boardanother hint Stack 1,10,100,1000,10000,100000,... vertically: 1 10 100 1000 10000 100000 ... the cumulative sums of digits from the top are: 1,3,6,10,15,21,... which are in the form of combination(N,2) = N*(N-1)/2 checking whether one is at Kth digit is the same as finding if there is integer solution to: N*(N-1)/2 = K-1 one way is to solve the quadratic equation for N (in double) and cast N to integer and check the above relation. regards, So Sui Ming Edited by author 16.01.2024 19:27 Edited by author 16.01.2024 19:27 |
|
|