結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2024-11-13 18:36:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 562 ms |
コンパイル使用メモリ | 68,336 KB |
最終ジャッジ日時 | 2025-02-25 04:06:16 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream>using namespace std;string f(const string& a){string res;for (char c : a) {if (islower(c)) {res += toupper(c);} else if (isupper(c)) {res += tolower(c);} else {res += c;}}return res;}int main(){string s;cin >> s;cout << f(s) << endl;}