結果

問題 No.163 cAPSlOCK
ユーザー inosinmk2
提出日時 2025-08-05 13:30:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 603 bytes
コンパイル時間 629 ms
コンパイル使用メモリ 101,160 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-08-05 13:30:39
合計ジャッジ時間 1,593 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
using namespace std;
using ll = long long;

int main(void)
{
  string S, R;
  cin >> S;
  int Upper = 90, Lower = 97;
  for (int i = 0; i < S.size(); i++)
  {
    if (isupper(S.at(i)))
    {
      R += tolower(S.at(i));
    }
    else
    {
      R += toupper(S.at(i));
    }
    /*
    if (S.at(i) <= Upper)
    {
      R += (S.at(i) + 32);
    }
    else
    {
      R += (S.at(i) - 32);
    }
    */
  }
  cout << R << endl;
  return 0;
}
0