結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2019-07-26 19:57:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 1,693 ms |
コンパイル使用メモリ | 192,952 KB |
最終ジャッジ日時 | 2025-01-07 07:37:57 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin>>s; int diff = 'a'-'A'; for (char& c : s) { if ('A' <= c && c <= 'Z') c += diff; else c -= diff; } cout << s << endl; return 0; }