Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
147190 谢绍澜 二进制转十进制 C++ Wrong Answer 0 MS 268 KB 429 2026-02-03 15:56:03

Tests(0/20):


Code:

#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(){ int n,s=0,k=1; cin>>n; while(n){ s+=n%10*k; n/=10; k*=2; } cout<<s; return 0; }


Run Info:

------Input------
111001111110000111111010111100
------Answer-----
972586684
------Your output-----
2559