From f835efb82f7a07cd50b842114afd6558c54fbcbe Mon Sep 17 00:00:00 2001 From: dedrSE Date: Mon, 3 Nov 2025 15:51:31 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat(#1):=20BOJ-2745=20=EC=A7=84=EB=B2=95?= =?UTF-8?q?=20=EB=B3=80=ED=99=98=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BB=A4?= =?UTF-8?q?=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 main.cpp diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..7f51ced --- /dev/null +++ b/main.cpp @@ -0,0 +1,2 @@ +#include + From 483130f13bf2e3f69038dfbd186036f9edc78eb3 Mon Sep 17 00:00:00 2001 From: dedrSE Date: Mon, 3 Nov 2025 16:18:06 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat(#1):=20BOJ-2745=20=EC=A7=84=EB=B2=95?= =?UTF-8?q?=20=EB=B3=80=ED=99=98=20=ED=8F=B4=EB=8D=94=EA=B5=AC=EC=A1=B0=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baekjoon/2745/solution.cpp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 baekjoon/2745/solution.cpp diff --git a/baekjoon/2745/solution.cpp b/baekjoon/2745/solution.cpp new file mode 100644 index 0000000..2187517 --- /dev/null +++ b/baekjoon/2745/solution.cpp @@ -0,0 +1,7 @@ +#include + +using namesapce std; + +int main() { + +} From 579a7e601dd77f820b7ed86c60ac200f377c62b5 Mon Sep 17 00:00:00 2001 From: dedrSE Date: Mon, 10 Nov 2025 14:39:23 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat(#1):=20BOJ-2745=20=EC=A7=84=EB=B2=95?= =?UTF-8?q?=20=EB=B3=80=ED=99=98=20=EC=B5=9C=EC=A2=85=20=EC=A0=9C=EC=B6=9C?= =?UTF-8?q?-=EC=A0=95=EB=8B=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baekjoon/2745/solution.cpp | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/baekjoon/2745/solution.cpp b/baekjoon/2745/solution.cpp index 2187517..74ac32c 100644 --- a/baekjoon/2745/solution.cpp +++ b/baekjoon/2745/solution.cpp @@ -1,7 +1,31 @@ #include +#include -using namesapce std; +using namespace std; int main() { + string input_num; + int base_num; + int input_size; + int result = 0; -} + cin >> input_num >> base_num; + + input_size = input_num.size(); + + for(int i = input_size-1 ; i >=0 ; i--){ + char c = input_num.at(i); + int tmp; + if(isalpha(c)){ + tmp = (tolower(c) - 'a' + 10); + } else { + tmp = c - '0'; + } + // cout << tmp << "*" << pow(base_num, (input_size-i-1)) << endl; + tmp = (tmp * pow(base_num, (input_size-i-1))); + // cout << tmp << endl; + result += tmp; + } + + cout << result; +} \ No newline at end of file