| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147192 | 谢绍澜 | 二进制转十进制 | C++ | Wrong Answer | 0 MS | 272 KB | 435 | 2026-02-03 15:57:39 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<vector> #include<set> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ long long n,s=0,k=1; cin>>n; while(n){ s+=n%10*k; n/=10; k*=2; } cout<<s; return 0; }
------Input------
111001111110000111111010111100
------Answer-----
972586684
------Your output-----
2975007