https://www.acmicpc.net/problem/4999
aah의 길이는 문자열의 길이라는 점을 활용하면 됩니다.
#include <iostream>
using namespace std;
string strs[2];
int main()
{
ios::sync_with_stdio(0), cin.tie(0);
for (string &str : strs)
{
cin >> str;
}
cout << (strs[0].length() >= strs[1].length() ? "go" : "no");
return 0;
}
문자열의 길이를 비교하면 됩니다.
재환이가 낼 수 있는 'aaah'의 길이가 의사가 듣기를 원하는 'aah'의 길이보다 크거나 같으면 go를 작다면 no를 출력하면 됩니다.