Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
Galebickosikasa
Oct 21st, 2019
215
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.20 KB
| None
|
0
0
raw
download
clone
embed
print
report
def to_ten(x, p):
x = str(x)
ans = 0
ns = 1
for i in range(len(x) - 1, -1, -1):
ans += int(x[i]) * ns
ns *= p
return ans
t = 1001100110
print(to_ten(t, 2))
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Mapscan v2.4 - Archeagus Grey Hack Series, Ep...
JavaScript | 20 hours ago | 12.26 KB
OoT rando seed 6/13
1 day ago | 202.05 KB
w
1 day ago | 0.10 KB
[email protected]
- idiot sending fr...
1 day ago | 1.35 KB
Untitled
2 days ago | 0.03 KB
Checking in availability
2 days ago | 0.66 KB
TRMP TOKEN
2 days ago | 1.56 KB
Untitled
2 days ago | 0.16 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!