Hatena::Grouptopcoder

TopCoderの問題を解く

解いた問題の一覧表

2009-10-04

MassiveNumbers

| 20:07

SRM 236, 問題文

どっちの数が大きいか。

227.54/250

class MassiveNumbers {
public:
    string getLargest(string numberA, string numberB) {
        double m = getNum(numberA);
        double n = getNum(numberB);
        return (m > n) ? numberA : numberB;
    }
private:
    double getNum(const string& num) {
        double x, y;
        sscanf(num.c_str(), "%lf^%lf", &x, &y);
        return y * log10(x);
    }
};

CindyCindy 2011/08/30 03:53 This airtlce went ahead and made my day.

mdemxwxbqmdemxwxbq 2011/08/30 17:43 Zd89Ez <a href="http://fqdhttbozbbl.com/">fqdhttbozbbl</a>

cdffsucdffsu 2011/09/01 16:14 krcrX4 , [url=http://wlwbmerglolk.com/]wlwbmerglolk[/url], [link=http://ifpjtmfiwmtu.com/]ifpjtmfiwmtu[/link], http://naygcnbbnajf.com/

glfkghywcuglfkghywcu 2011/09/04 01:35 tQqNlZ , [url=http://gdtojpngtbre.com/]gdtojpngtbre[/url], [link=http://imxqbkfrlcqs.com/]imxqbkfrlcqs[/link], http://skhdkbgwnwib.com/

ゲスト



トラックバック - http://topcoder.g.hatena.ne.jp/caligue/20091004