結果

問題 No.18 うーさー暗号
ユーザー naimonon77naimonon77
提出日時 2015-09-27 13:40:48
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 647 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 67,296 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-26 16:43:54
合計ジャッジ時間 1,225 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>
using namespace std;


#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/* */
int main(void)
{
   int i,j;
   char s[1025];
   /* 入力開始! */
   cin >> s;
   /* 入力終了! */
   for(i=0; s[i]; i++) {
      if(s[i] - 'A' >= (i+1) % 25) s[i] -= (i+1) % 25;
      else {
         s[i] = s[i] + 26 - ((i+1) % 25);
      }
   }
   cout << s << endl;

   return 0;
}
0