Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

피너클의 it공부방

백준 25372 성택이의 은밀한 비밀번호 (c++) : 피너클 본문

백준

백준 25372 성택이의 은밀한 비밀번호 (c++) : 피너클

피너클 2022. 8. 5. 17:22
728x90
반응형

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

 

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

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

www.acmicpc.net

간단한 구현 문제다.

#include <iostream>
#include <string>

using namespace std;


int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

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

전체코드다.

728x90
반응형
Comments