Hatena::Grouptopcoder

TopCoderの問題を解く

解いた問題の一覧表

2009-05-11

InterestingDigits

| 18:51

問題文

251.51->499.03

説明が面倒なので無し。

class InterestingDigits {
public:
    vector <int> digits(int base) {
        vector <int> result;
        for (int d = 2; d < base; d++) {
            if (isInterestingDigit(base, d))
                result.push_back(d);
        }
        return result;
    }
private:
    bool isInterestingDigit(const int base, const int d) {
        return base%d == 1;
    }
};

MissyMissy2011/07/22 16:09Now I know who the brainy one is, I'll keep looknig for your posts.

zrwuybrcsgozrwuybrcsgo2011/07/23 22:08xDBJGa , [url=http://ngbsklytunqc.com/]ngbsklytunqc[/url], [link=http://olpwwtwjhupr.com/]olpwwtwjhupr[/link], http://vfyjnrgeopbs.com/

qbqmjjqbqmjj2011/07/24 21:58F1VCcA <a href="http://iyopswirddsc.com/">iyopswirddsc</a>