From 6adeba84478830695363ec4230ffafc49acdc30b Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Wed, 11 Sep 2024 00:21:42 -0500 Subject: [PATCH] typo --- cplusplus/src/p0017.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cplusplus/src/p0017.cpp b/cplusplus/src/p0017.cpp index 92b3f4d1..b1fbabe5 100644 --- a/cplusplus/src/p0017.cpp +++ b/cplusplus/src/p0017.cpp @@ -100,7 +100,7 @@ uint64_t EMSCRIPTEN_KEEPALIVE p0017() { for (uint32_t x = 1; x < 1001; x += 1) { std::string str = ToString(x); for (pos = 0, i = 0; i < 2; i++) - while ((pos = str.find(" ", pos)) != std::string::npos) + while ((pos = str.find(filter[i], pos)) != std::string::npos) str.replace(pos, 1, ""); answer += str.length();