(프로그래머스) 개인정보 수집 유효기간 문제 풀이
1이상 8이하의 정수 n이 주어진다 할때, n자리의 자연수에 대해서 왼쪽부터 1자리수 2자리수 ~ n자리수 까지 전부 모두 소수인 n자리 자연수를 찾는 문제이다. 따라 다음과 같은 문제는 왼쪽부터 자리수의 정수를 확인하며 모든 자리의 수가 소수인 경우 오름차순으로 하나
첫 줄에 입력으로 노드의 수와 간선의 수가 주어진다.다음 줄 부터는 친구들간의 관계가 주어진다.문제의 목적의 DFS를 통하여 DFS의 Depth가 조건에 만족하는 경우 1을 출력하고 아니면 0을 출력하는 문제이다.DFS를 실행하면서 depth를 같이 count해주고 d