diff --git a/g0rnn/BruteForce/4-g0rnn.cpp b/g0rnn/BruteForce/4-g0rnn.cpp new file mode 100644 index 0000000..af9f4ee --- /dev/null +++ b/g0rnn/BruteForce/4-g0rnn.cpp @@ -0,0 +1,32 @@ +#include +#include +using namespace std; + +bool is_end_num(int end_num) +{ + string num = to_string(end_num); + int check = 0; + for (int i = 0; i < num.length() - 2; i++) + if (num[i] == '6' && num[i + 1] == '6' && num[i + 2] == '6') + return true; + + return false; +} + +int main() +{ + ios_base::sync_with_stdio(false); + cin.tie(NULL); + + int end_num = 666; + int cnt, ctr = 1; + cin >> cnt; + while (ctr != cnt) + { + end_num++; + if (is_end_num(end_num)) + ctr++; + } + cout << end_num; + return 0; +} \ No newline at end of file diff --git a/g0rnn/README.md b/g0rnn/README.md index 9b095df..8dba38e 100644 --- a/g0rnn/README.md +++ b/g0rnn/README.md @@ -1,6 +1,10 @@ -## ✏️ 기록 +## ✏️ 기록 + +| 차시 | 날짜 | 문제유형 | 링크 | 풀이 | +| :---: | :--------: | :--------: | :---------------------------------------------------------------------------: | :-------------------------------------------------: | +| 1차시 | 2024.10.01 | 구현 | [추억 점수](https://school.programmers.co.kr/learn/courses/30/lessons/176963) | https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/35 | +| 2차시 | 2024.10.03 | 트리 | [LCA2](https://school.programmers.co.kr/learn/courses/30/lessons/176963) | https://github.com/AlgoLeadMe/AlgoLeadMe-12/pull/7 | +| 3차시 | 2024.10.04 | 문자열 | [잃어버린 괄호](https://www.acmicpc.net/problem/1541) | https://github.com/AlgoLeadMe/AlgoLeadMe-12/pull/9 | +| 4차시 | 2024.10.11 | 브루트포스 | [영화감독 숌](https://www.acmicpc.net/problem/1436) | https://github.com/AlgoLeadMe/AlgoLeadMe-12/pull/15 | -| 차시 | 날짜 | 문제유형 | 링크 | 풀이 | -|:----:|:---------:|:----:|:-----:|:----:| -| 1차시 | 2024.10.01 | 구현 | [추억 점수](https://school.programmers.co.kr/learn/courses/30/lessons/176963)|https://github.com/AlgoLeadMe/AlgoLeadMe-1/pull/35| ---