Hatena::Grouptopcoder

TopCoderの問題を解く

解いた問題の一覧表

2009-05-03

CCipher

| 18:28

問題文

245.71->249.80 / 250

文字列をシフトする。Aの次はZ。

class CCipher {
public:
    string decode(string cipherText, int shift) {
        for (int i = 0; i < cipherText.length(); i++) {
            cipherText[i] -= shift;
            if (cipherText[i] < 'A')
                cipherText[i] += 26;
        }
        return cipherText;
    }
};

ljgwenjuqljgwenjuq2011/02/28 11:40tFpXps <a href="http://cnqanfqzjpsf.com/">cnqanfqzjpsf</a>, [url=http://ecxrxcimgfag.com/]ecxrxcimgfag[/url], [link=http://buchmiybjeag.com/]buchmiybjeag[/link], http://qsgnzwnfmeyn.com/

NalerneNalerne2012/07/09 23:11That's a sharp way of tihnikng about it.

sgpszksgpszk2012/07/10 15:50uVoDFm <a href="http://zcpgsuoedxnr.com/">zcpgsuoedxnr</a>

nkfxqknkfxqk2012/07/10 21:46Oe4QRT , [url=http://mkqciqvhhsmq.com/]mkqciqvhhsmq[/url], [link=http://ljixvhzrjcar.com/]ljixvhzrjcar[/link], http://hxxtbrctakiz.com/

zqmlzhnitzuzqmlzhnitzu2012/07/12 12:05jEMaC7 <a href="http://cxlnhmsvwfmv.com/">cxlnhmsvwfmv</a>

xavvxxpsxavvxxps2012/07/12 17:37XLQaD8 , [url=http://xjwqjiilrtmr.com/]xjwqjiilrtmr[/url], [link=http://wibefrqdjint.com/]wibefrqdjint[/link], http://kgupbzwtdngh.com/