Run ID:161977

提交时间:2026-10-11 10:24:51

#include<bits/stdc++.h> using namespace std; int main(){ //00 01 10 11 100 101 110 111 1000 1001 1010 1011 1100 1100 1101 1110 1111 10000 int h=0; string s; cin>>s; int l=s.size(); for(int i=0,j=l-1;i<l&&j>=0;i++,j--){ h+=(s[j]-'0')*pow(2,i); } cout<<h; return 0; }