2023. 12. 26. 19:14, 코딩 테스트/백준(BOJ)
https://www.acmicpc.net/problem/10988
구현 코드
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
string rev;
cin>>rev;
string str = rev;
reverse(rev.begin(),rev.end());
if(str == rev) cout<<"1";
else cout<<"0";
return 0;
}
리뷰
reverse 함수를 알고있다면 간단하게 해결 가능
'코딩 테스트 > 백준(BOJ)' 카테고리의 다른 글
[BOJ] 11655번 : ROT13 (0) | 2023.12.27 |
---|---|
[BOJ] 1620번 : 나는야 포켓몬 마스터 이다솜 (0) | 2023.12.26 |
[BOJ] 10808번 : 알파벳 개수 (0) | 2023.12.26 |
[BOJ] 11024번 : 더하기 4 (0) | 2023.02.23 |
[BFS | 기본 문제] 5427번 : 불 (0) | 2023.02.15 |
Comments