結果

問題 No.163 cAPSlOCK
ユーザー 29da164
提出日時 2020-07-22 10:22:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 335 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 61,132 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-03 08:27:15
合計ジャッジ時間 1,618 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(void){
  std::string s;
  int length;
  int x[100];
 
  std::cin >> s;
  const char* c = s.c_str();
  length = s.length();
  for(int i=0;i<length;i++){
    int j = (int)c[i];
    if(j>96){
      x[i]=j-32;
    }
    else{
      x[i]=j+32;
    }
    std::cout << (char)x[i];
  }
  std::cout << std::endl;
}
0