結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
kei
|
| 提出日時 | 2016-08-06 00:09:28 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 370 bytes |
| コンパイル時間 | 493 ms |
| コンパイル使用メモリ | 54,996 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 00:09:10 |
| 合計ジャッジ時間 | 1,335 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;
int main() {
string str;
cin >> str;
int len = str.length();
for (int i = 0;i < len; i++) {
if (str[i] >= 'a' && str[i] <= 'z') {
str[i] = toupper(str[i]);
}
else if (str[i] >= 'A' && str[i] <= 'Z') {
str[i] = tolower(str[i]);
}
}
cout << str << endl;
return 0;
}
kei