結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  hayaD | 
| 提出日時 | 2015-05-04 12:10:39 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 458 bytes | 
| コンパイル時間 | 762 ms | 
| コンパイル使用メモリ | 70,792 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-07 05:41:59 | 
| 合計ジャッジ時間 | 1,077 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 | 
ソースコード
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	string in;
	string l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	cin >> in;
	string out = "";
	for (int i = 0;i < (int)in.length();i++){
		int loc = (int)l.find(in.substr(i,1));
		int decode_loc = (loc - i - 1 + 26000000)%26;
		out += l.substr(decode_loc,1);
	}
	cout << out << endl;
	return 0;
}
            
            
            
        