結果

問題 No.18 うーさー暗号
ユーザー monnu
提出日時 2021-07-14 01:45:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 443 bytes
コンパイル時間 1,579 ms
コンパイル使用メモリ 166,020 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-02 22:42:13
合計ジャッジ時間 2,201 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll=long long;
using Graph=vector<vector<int>>;
#define MAX 1000000
#define MOD 1000000009
//#define MOD 998244353
//#define INF 1000000000
#define INF 1000000000000000000

int main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    int d=s[i]-'A';
    d+=26-(i+1)%26;
    d%=26;
    char c='A'+d;
    cout<<c;
  }
  cout<<endl;
}
0