Codeforces - 1703A - YES or YES?

HoJeong Im·2022년 10월 10일
0

Codeforces

목록 보기
11/13

개요

  • c++ transform, 입출력

https://codeforces.com/problemset/problem/1703/A

코드

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main() {
    
    int count;
    cin >> count;
    cin.ignore();
    for(int i = 0; i < count; i++){
        
        string str;
        cin >> str;
        transform(str.begin(), str.end(), str.begin(), ::tolower);
        
        if(str.compare("yes") == 0){
            cout << "YES" << endl;
        }
        else {
            cout << "NO" << endl;
        }
        
    }
   
    return 0;
}
profile
꾸준함이 제일 빠른 길이었다

0개의 댓글