結果

問題 No.18 うーさー暗号
ユーザー hanyu
提出日時 2020-12-26 16:27:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 280 bytes
コンパイル時間 1,752 ms
コンパイル使用メモリ 192,504 KB
最終ジャッジ日時 2025-01-17 07:30:02
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  string s;
  cin >> s;
  
  for (int i = 0; i < s.size(); i++) {
    int add = (i + 1) % 26;
    s[i] -= add;
    if (s[i] < 'A') s[i] += 26;
  }
  
  cout << s << '\n';
}
0