Python 2, Python 3, 41 bytes
i,j=input(),input()
while j>0:i=-~i;j=~-j
#Python 2, Python 3, 41 bytes
i,j=input(),input()
while j>0:i=-~i;j=~-j
If using the - number
operator is allowed.
Python 2, Python 3, 40 bytes
i,j=input(),input()
while j>0:i=-~i;j-=1
#Python 2, Python 3, 40 bytes
i,j=input(),input()
while j>0:i=-~i;j-=1
If using the - number
and literal -= number
operators is allowed.
Works on positive integers. Takes a
and b
and prints a
+b
.