From a012331563cddc6a569d19fa673420eb278c0272 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Mon, 1 Jun 2026 15:42:26 +0900 Subject: [PATCH] =?UTF-8?q?1436=20:=20=EC=98=81=ED=99=94=EA=B0=90=EB=8F=85?= =?UTF-8?q?=20=EC=88=8C=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week2/BOJ1436/BOJ1436_V1.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/week2/BOJ1436/BOJ1436_V1.cpp diff --git a/src/week2/BOJ1436/BOJ1436_V1.cpp b/src/week2/BOJ1436/BOJ1436_V1.cpp new file mode 100644 index 0000000..06d507f --- /dev/null +++ b/src/week2/BOJ1436/BOJ1436_V1.cpp @@ -0,0 +1,26 @@ +#include +using namespace std; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cout.tie(NULL); + + int N; + cin >> N; + int num = 665; + int cnt=0; + + while(true) { + num++; + if (to_string(num).find("666") != string::npos) { + cnt++; + } + if (N == cnt) { + cout << num; + break; + } + } + + return 0; +} \ No newline at end of file