Run ID:79552

提交时间:2024-07-08 14:34:57

#include <bits/stdc++.h> using namespace std; int main() { char b[64]; int ans=0; gets(b); int len=strlen(b); for(int i=0,j=len-1;i<len,j>=0;i++,j--){ ans+=((b[j]-'0')*pow(2,i)); } cout<<ans; return 0; }