c++
#include <iostream>
#include <algorithm>
using namespace std;
string skew;
int main()
{
while (cin >> skew)
{
int res = 0;
for (int i = 0; i < skew.size(); i ++ )
res += (skew[i] - '0') * (pow(2, skew.size() - i) - 1);
cout << res << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发