diff --git a/C++/nth-digit.cpp b/C++/nth-digit.cpp index c30adbf0b..afe69e929 100644 --- a/C++/nth-digit.cpp +++ b/C++/nth-digit.cpp @@ -6,7 +6,7 @@ class Solution { int findNthDigit(int n) { int digit_len = 1; while (n > digit_len * 9 * pow(10, digit_len - 1)) { - n -= digit_len * 9 * pow(10, digit_len - 1); + n -= digit_len * 9 * pow(10, digit_len - 1); ++digit_len; }