結果

問題 No.18 うーさー暗号
ユーザー picakunpicakun
提出日時 2017-05-26 18:52:42
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 273 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 56,576 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 06:30:21
合計ジャッジ時間 1,042 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<stdio.h>

using namespace std;


int main(){
	string S;
	cin >> S;
	int ascii;
	for(int i = 0; i < S.length(); i++){
		ascii = S[i] -((i+1)%26);
		if(ascii < 'A')
			ascii += 26;
		putchar(ascii);
	}
	cout << endl;
	return 0;
}
0