結果

問題 No.163 cAPSlOCK
ユーザー nyro2
提出日時 2017-12-05 11:51:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 1,441 ms
コンパイル使用メモリ 54,748 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-28 16:33:04
合計ジャッジ時間 1,215 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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.size(); i++) {
        if (s[i] <= 90 && s[i] >= 65) s[i] += 32;
        else if (s[i] <= 122 && s[i] >= 97) s[i] -= 32; 
    } 
    
    std::cout << s << std::endl;
	
	return 0;
}
0