結果

問題 No.163 cAPSlOCK
ユーザー lbeeno09
提出日時 2020-05-10 13:43:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 64,316 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-07 14:49:30
合計ジャッジ時間 1,511 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

int main() {
    std::string s;
    std::cin >> s;

    for(int i = 0; i < s.length(); i++) {
        if('a' <= s[i] && s[i] <= 'z') {
            std::cout << (char)(s[i] - 32);
        } else {
            std::cout << (char)(s[i] + 32);
        }
    }
    std::cout << std::endl;
}
0