Official
A - CAPS LOCK Editorial
by
A - CAPS LOCK Editorial
by
m_99
プログラミングの学習を始めたばかりで何から手をつけるべきかわからない方は、まずは「practice contest」(https://atcoder.jp/contests/practice/) の問題A「Welcome to AtCoder」をお試しください。言語ごとに解答例が掲載されています。
また、プログラミングコンテストの問題に慣れていない方は、「AtCoder Beginners Selection」(https://atcoder.jp/contests/abs) の問題をいくつか試すことをおすすめします。
「競プロ典型 90 問」(https://atcoder.jp/contests/typical90) では、プログラミングコンテストで扱われる典型的な 90 問の問題に挑戦可能です。
「C++入門 AtCoder Programming Guide for beginners (APG4b)」(https://atcoder.jp/contests/APG4b) は、競技プログラマー向けのC++入門用コンテンツです。
ある英小文字 \(c\) を英大文字に変換する処理は、例えばC++ではtoupper関数を用いて以下のように書けます。
//Cにcを大文字に変換したものを代入
char C = toupper(c);
そこで、for文を用いて \(S\) の各文字を順番にtoupperに変換すれば良いです。
実装例 (C++)
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin>>S;
string T = "";
for(int i=0;i<S.size();i++)T += toupper(S[i]);
cout<<T<<endl;
return 0;
}
posted:
last update: