Notice
Recent Posts
Recent Comments
Link
250x250
«   2025/07   »
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공부방

백준 4999 아! (c++) : 피너클 본문

백준

백준 4999 아! (c++) : 피너클

피너클 2022. 7. 23. 20:56
728x90
반응형

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

 

4999번: 아!

입력은 두 줄로 이루어져 있다. 첫째 줄은 재환이가 가장 길게 낼 수 있는 "aaah"이다. 둘째 줄은 의사가 듣기를 원하는 "aah"이다. 두 문자열은 모두 a와 h로만 이루어져 있다. a의 개수는 0보다 크거

www.acmicpc.net

간단한 구현문제다.

#include <iostream>
#include <string>

using namespace std;

string a, b;

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

	cin >> a >> b;
	if (a.length() >= b.length()) cout << "go" << endl;
	else cout << "no" << endl;
}

전체코드다.

728x90
반응형
Comments