結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-03 17:55:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 833 bytes |
| コンパイル時間 | 1,944 ms |
| コンパイル使用メモリ | 192,708 KB |
| 最終ジャッジ日時 | 2025-01-15 19:23:15 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;
using P = pair<ll, ll>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, -1, 0, 1};
string char_to_string(char val) {
return string(1, val);
}
int char_to_int(char val) {
return val - '0';
}
char inverse_char(char c) {
if(isupper(c)) return tolower(c);
else return toupper(c);
}
template<class T> inline bool chmin(T& a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template<class T> inline bool chmax(T& a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
struct edge {
ll to, cost;
};
int main() {
string S; cin >> S;
REP(i, S.size()) {
S[i] = inverse_char(S[i]);
}
cout << S << endl;
}