From 32e90c78708777f4adac334ece0f65d130676c74 Mon Sep 17 00:00:00 2001 From: SongSiWoon Date: Sun, 10 Jul 2022 02:49:58 +0900 Subject: [PATCH] Feat: Add solution of #118 --- src/BaekJoon/SongSiWoon/1436/main.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/BaekJoon/SongSiWoon/1436/main.cpp diff --git a/src/BaekJoon/SongSiWoon/1436/main.cpp b/src/BaekJoon/SongSiWoon/1436/main.cpp new file mode 100644 index 0000000..5b88d26 --- /dev/null +++ b/src/BaekJoon/SongSiWoon/1436/main.cpp @@ -0,0 +1,16 @@ +#include +#include +using namespace std; + +int main(){ + int N; + cin >> N; + int start = 665; + while (N > 0) { + start++; + if(to_string(start).find("666")!=string::npos) { + N--; + } + } + printf("%d", start); +}