auto va = getString(a), vb = getString(b); int c = 0; for (auto s : va) { c += s2i[s]; } for (auto s : vb) { c += s2i[s]; }
vector<string> ans; for (int i = 12; i >= 0; --i) { int base = pow(2, i); if (c < base) continue; ans.push_back(i2s[base]); if (base == 1) break; c = c % base; }
if (!c) ans.push_back("one");
reverse(ans.begin(), ans.end()); string ret; for (int i = 0; i < ans.size(); ++i) { ret += ans[i]; if (i != ans.size() - 1) ret += " "; }