피너클의 it공부방
백준 4999 아! (c++) : 피너클 본문
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
반응형
'백준' 카테고리의 다른 글
백준 11779 최소비용 구하기 2 (c++) : 피너클 (0) | 2022.07.29 |
---|---|
백준 15657 N과 M(8) (c++) : 피너클 (0) | 2022.07.25 |
백준 9086 문자열 (c++) : 피너클 (0) | 2022.07.22 |
백준 2754 학점계산 (c++) : 피너클 (0) | 2022.07.21 |
백준 4101 크냐? (c++) : 피너클 (0) | 2022.07.20 |
Comments