문제 링크입니다: www.acmicpc.net/problem/17863
17863번: FYI
In the United States of America, telephone numbers within an area code consist of 7 digits: the prefix number is the first 3 digits and the line number is the last 4 digits. Traditionally, the 555 prefix number has been used to provide directory informatio
www.acmicpc.net
간단한 구현 문제였습니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(0); | |
cin.tie(0); | |
string N; | |
cin >> N; | |
cout << (N.substr(0, 3) == "555" ? "YES" : "NO") << "\n"; | |
return 0; | |
} |


개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 17903번 Counting Clauses (0) | 2021.03.26 |
---|---|
백준 17874번 Piece of Cake! (0) | 2021.03.26 |
백준 17388번 와글와글 숭고한 (0) | 2021.03.26 |
백준 17362번 수학은 체육과목 입니다 2 (0) | 2021.03.26 |
백준 17009번 Winning Score (0) | 2021.03.26 |