結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2019-02-05 00:37:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 702 ms |
コンパイル使用メモリ | 54,740 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 08:23:13 |
合計ジャッジ時間 | 1,720 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; string new_str; for(int i=0; i < s.size(); i++) { char ch = s[i]; if (('a' <= ch) && (ch <= 'z')) { ch = 'A' + ch - 'a'; } else if (('A' <= ch) && (ch <= 'Z')) { ch = 'a' + ch - 'A'; } new_str += ch; } cout << new_str << '\n'; return 0; }