結果

問題 No.18 うーさー暗号
ユーザー knkknk
提出日時 2017-09-17 17:44:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 1,326 ms
コンパイル使用メモリ 168,124 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 06:36:31
合計ジャッジ時間 1,821 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ul;
typedef signed long long ll;
ul over = 1000000007;

int main(void)
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    int diff = (i+1)%26;
    char c = (s[i]-'A' >= diff ? s[i]-diff : s[i] + 26 - diff);
    cout << c;
  }
  cout << endl;
  return 0;
}
0