본문 바로가기
백준

[1436] 영화감독 숌

by Jcoder 2019. 1. 4.


/*
1436 : 영화감독 숌
https://www.acmicpc.net/problem/1436
https://github.com/tjdskaqks
http://jcoder1.tistory.com/
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n, num = 0;
cin >> n;
for (int i = 666; ; ++i)
{
string s = to_string(i);
if (s.find("666") != -1)
++num;
if (num == n)
{
cout << i;
break;
}
}
}



'백준' 카테고리의 다른 글

[1977] 완전제곱수  (0) 2019.01.03
[11729] 하노이 탑 이동 순서  (0) 2018.10.29
[2902] KMP는 왜 KMP일까?  (0) 2018.10.21
[1991] 트리 순회  (0) 2018.10.20
[9252] LCS 2  (0) 2018.10.20