본문 바로가기

Coding/백준 온라인 저지 (Baekjoon Online Judge)

백준 온라인 저지(Baekjoon Online Judge) - 25372 : 성택이의 은밀한 비밀번호

https://www.acmicpc.net/problem/25372

 

25372번: 성택이의 은밀한 비밀번호

부산사이버대학교 학생 성택이는 엄마의 의뢰를 받아 주어진 문자열이 현관문 비밀번호에 사용 가능한지 알아내야 한다. 성택이는 공부해야 하므로 우리가 도와주자! 사용할 수 있는 비밀번호

www.acmicpc.net

 

#include <iostream>
#include <string>
using namespace std;

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		string s;
		cin >> s;
		if (s.length() >= 6 && s.length() <= 9)
			cout << "yes" << endl;
		else
			cout << "no" << endl;
	}
}