結果

問題 No.18 うーさー暗号
ユーザー moshiya02
提出日時 2018-03-15 20:59:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 400 ms
コンパイル使用メモリ 57,448 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-21 10:42:21
合計ジャッジ時間 1,037 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main(){
  string s;
  cin >> s;

  string std;
  int i;
  char tmp;
  for(i=0;i<s.length();i++){
    tmp = s[i] -'A' - (i+1);
    tmp %= 26;
    if(tmp < 0)tmp += 26;
    
    std += tmp + 'A';
  }

  cout << std << endl;
  
  return 0;
}
0