Online Judge
Toggle navigation
C++题库系统 OJ
首页
问题列表
状态
排行榜
登录
首页
状态
71513
Run ID
作者
问题
语言
测评结果
Time
Memory
代码长度
提交时间
71513
胡海峰老师
二进制转十进制
Python3
Accepted
36 MS
3760 KB
134
2024-04-25 10:12:19
Tests(20/20):
Code:
s = input() res = 0 s = list(s) p = 1 while s: v = s.pop() if v == '1': res += p p = p*2 print(res)