Skip to content

Commit

Permalink
2024-10-11 영화감독 숌
Browse files Browse the repository at this point in the history
  • Loading branch information
g0rnn committed Oct 11, 2024
1 parent 8a261a4 commit 28ea709
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
32 changes: 32 additions & 0 deletions g0rnn/BruteForce/4-g0rnn.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <iostream>
#include <string>
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;
}
12 changes: 8 additions & 4 deletions g0rnn/README.md
Original file line number Diff line number Diff line change
@@ -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|
---

0 comments on commit 28ea709

Please sign in to comment.