結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-07 22:31:50 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 414 bytes |
| コンパイル時間 | 868 ms |
| コンパイル使用メモリ | 56,648 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 11:09:14 |
| 合計ジャッジ時間 | 1,665 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
char convert(char in) {
if ('a' <= in && in <= 'z') {
return in - 'a' + 'A';
} else {
return in - 'A' + 'a';
}
}
int main() {
string password;
cin >> password;
for (unsigned int i = 0; i < password.size(); i++) {
password[i] = convert(password[i]);
}
cout << password << endl;
return 0;
}