結果

問題 No.18 うーさー暗号
ユーザー Rumain831
提出日時 2025-05-04 18:30:06
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 830 ms
コンパイル使用メモリ 70,884 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-05-04 18:30:08
合計ジャッジ時間 1,961 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
using namespace std;
using ll = long long;

int main(void){
  string s; cin >> s;
  string ans, full;
  for(int i=0; i<26; i++) full+=(char)('A'+i);
  int n=s.size();
  for(int i=0; i<n; i++){
    int now=s[i]-'A';
    int left=2600-(i+1); left%=26;
    ans+=full[(now+left)%26];
  }
  cout << ans << endl;
  return 0;
}
0