From d76d1dc3520fd903986fc9478ac85baf7ee5a98a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 19 Nov 2024 08:57:42 +0000 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=8A=88=20#322=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=86=94=EB=A3=A8=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0\354\235\230_\353\215\247\354\205\210_1.cpp" | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 "Programmers/\354\210\250\354\226\264\354\236\210\353\212\224_\354\210\253\354\236\220\354\235\230_\353\215\247\354\205\210_1.cpp" diff --git "a/Programmers/\354\210\250\354\226\264\354\236\210\353\212\224_\354\210\253\354\236\220\354\235\230_\353\215\247\354\205\210_1.cpp" "b/Programmers/\354\210\250\354\226\264\354\236\210\353\212\224_\354\210\253\354\236\220\354\235\230_\353\215\247\354\205\210_1.cpp" new file mode 100644 index 0000000..2da36bc --- /dev/null +++ "b/Programmers/\354\210\250\354\226\264\354\236\210\353\212\224_\354\210\253\354\236\220\354\235\230_\353\215\247\354\205\210_1.cpp" @@ -0,0 +1,16 @@ +#include +#include + +using namespace std; + +int solution(string my_string) { + int answer = 0; + + for (char c : my_string) { + if (isdigit(c)) { + answer += c - '0'; + } + } + + return answer; +} \ No newline at end of file