結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2024-06-02 09:30:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 1,794 ms |
コンパイル使用メモリ | 168,728 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 05:34:03 |
合計ジャッジ時間 | 2,726 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ill = int long long;#define rep(i, n) for (ill i = 0; i < (n); i++)#define all(s) s.begin(), s.end()using inp = pair<int, int>;using vecb = vector<bool>;using vecb2 = vector<vecb>;int main(){string s;cin >> s;vector<char> ans;rep(i, (ill)s.size()){if (islower(s[i])){char t = toupper(s[i]);ans.push_back(t);}else{char t = tolower(s[i]);ans.push_back(t);}}rep(i, (ill)ans.size()){cout << ans[i];}}