| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 162394 | 李俊博 | 二进制转十进制 | C++ | Accepted | 1 MS | 280 KB | 207 | 2026-10-17 14:36:58 |
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int sum=0,wei=1; for(int i=s.size()-1;i>=0;i--){ sum+=(s[i]-'0')*wei; wei*=2; } cout<<sum; return 0; }