結果

問題 No.18 うーさー暗号
ユーザー 29da164
提出日時 2020-07-27 10:43:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 345 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 65,384 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-28 20:02:05
合計ジャッジ時間 1,031 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(void){
  using namespace std;
  string a;
  int x;
  cin >> a;
  const char* ca = a.c_str();
  for(int i=0;i<a.length();i++){
    if((int)ca[i]-(i%26)-1<=64) x=(int)ca[i]-(i%26)-1+26;
    //if((int)ca[i]-(i%26)-1==64) x=90;
    else x=(int)ca[i]-(i%26)-1;
    cout << (char)x;
    //cout << x;
  }
  return 0;    
}
0