【AtCoder】ABC 446 A - Handmaid

A - Handmaid
AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.
AtCoder
実行時間制限: 2 sec / メモリ制限: 1024 MiB / Difficulty: 14 / NoviSteps: 8Q / 配点: 100 点
問題概要
ある人物の名前 が与えられる。 の先頭の文字は英大文字であり、先頭以外の文字は英小文字である。
この人物の侍女の名前は、 の頭文字を英小文字に直し、先頭に Of をつけて得られる文字列である。 この侍女の名前を出力せよ。
制約
考察
問題文の通りに処理すればよい。
の先頭を英小文字に直すには、tolower関数を使うと便利である。
実装例
CPP
1.#include <bits/stdc++.h>2.using namespace std;3. 4.// ======================================== //5. 6.int main()7.{8. string S;9. cin >> S;10. 11. S[0] = tolower(S[0]);12. 13. cout << "Of" << S << endl;14. 15. return 0;16.}https://atcoder.jp/contests/abc446/submissions/73764201
atcoder.jp
実装時間: 5 分以内
コメント
まあやるだけといったところ。





