Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
162379 邹金行 二进制转十进制 C++ Accepted 1 MS 288 KB 218 2026-10-17 14:22:21

Tests(20/20):


Code:

#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; int len=s.size(); int x=len-1,m=0; for(int i=0;i<len;i++){ m=m+pow(2,x)*(s[i]-'0'); x--; } cout<<m; return 0; }