fragment-header
fragment-markdown
홈
로그인
로그아웃
내 블로그
설정
로그인
Atcoder Beginner Contest 402-A (C++) CBC
최초 업로드: 2025-04-19 13:56:19
최근 수정 시간: 2025-08-12 15:25:19
게시자: rlatjwls3333
카테고리: Atcoder
조회수: 18
# A - CBC [문제 링크](https://atcoder.jp/contests/abc402/tasks/abc402_a) ## Problem Statement You are given a string $S$ consisting of uppercase and lowercase English letters. Print the string obtained by concatenating only the uppercase letters of $S$ in their original order. ## Constraints - $S$ is a string of uppercase and lowercase English letters. - The length of $S$ is between $1$ and $100$, inclusive. ## Input The input is given from Standard Input in the following format: $ S $ ## Output Print the string obtained by concatenating only the uppercase letters of $S$ in their original order. ## 풀이 #### 대문자만 출력하면 됩니다. ``` c++ #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); string s; cin >> s; for(char ch:s) { if(ch<='Z') cout << ch; } } ```