結果

問題 No.163 cAPSlOCK
ユーザー focus
提出日時 2018-01-23 19:25:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 317 bytes
コンパイル時間 606 ms
コンパイル使用メモリ 59,352 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 03:42:33
合計ジャッジ時間 1,462 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
    string str;
    cin >> str;
    for(int i=0;i<str.size();i++){
        if(str[i]>='a'&&str[i]<='z') str[i]-=32;
        else if(str[i]>='A'&&str[i]<='Z') str[i]+=32; 
    }
    cout << str;
    return 0;
}

0