結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
mumucoder
|
| 提出日時 | 2018-10-28 11:30:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 568 bytes |
| コンパイル時間 | 771 ms |
| コンパイル使用メモリ | 56,980 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-19 07:00:40 |
| 合計ジャッジ時間 | 1,417 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <cctype>
#include <iostream>
int main(int argc, char *argv[]) {
std::string wrong_password;
std::cin >> wrong_password;
std::string valid_password;
for (auto i = wrong_password.begin(); i != wrong_password.end(); i++) {
char current(*i);
if (std::isupper(current)) {
valid_password += static_cast<char>(std::tolower(static_cast<unsigned char>(current)));
}
if (std::islower(current)) {
valid_password += static_cast<char>(std::toupper(static_cast<unsigned char>(current)));
}
}
std::cout << valid_password << std::endl;
return 0;
}
mumucoder