Ad
Code
Diff
  • def should_return_1():
        # lets do it
        l = [1, 2, 3]
        return l.index(2) 
    • def should_return_1():
    • x = 56789
    • return x + 1 - x
    • # lets do it
    • l = [1, 2, 3]
    • return l.index(2)
Code
Diff
  • def should_return_1():
        x = 56789
        return x + 1 - x
    • def should_return_1():
    • x = 100 - 99
    • return x
    • x = 56789
    • return x + 1 - x
Code
Diff
  • def should_return_1():
        x = 100 - 99
        return x
    • def should_return_1():
    • x = 99 - 98
    • x = 100 - 99
    • return x
Code
Diff
  • def should_return_1():
        x = 99 - 98
        return x
    • def should_return_1():
    • x = 97 - 96
    • x = 99 - 98
    • return x
Code
Diff
  • def should_return_1():
        x = 97 - 96
        return x
    • def should_return_1():
    • x = 12354234 - 12354233
    • x = 97 - 96
    • return x
Code
Diff
  • def should_return_1():
        h = 6788
        return h - 6787
    • def should_return_1():
    • bbbbb = 2 - 1
    • return bbbbb
    • h = 6788
    • return h - 6787
Code
Diff
  • def sum_bitwise_powers(num: int) -> int:
        num = f'{num:b}'[::-1]
        summa = 0
        for i in range(len(num)):
            if num[i] == '1':
                summa += i
        return summa
    • def sum_bitwise_powers(num: int):
    • def sum_bitwise_powers(num: int) -> int:
    • num = f'{num:b}'[::-1]
    • summa = 3
    • summa = 0
    • for i in range(len(num)):
    • if num[i] == '1':
    • summa += i
    • return summa - 3
    • return summa
Code
Diff
  • def sum_bitwise_powers(num: int):
        num = f'{num:b}'[::-1]
        summa = 0
        for i in range(len(num)):
            if num[i] == '1':
                summa += i
        return summa + 1 - 1
    • def sum_bitwise_powers(num: int):
    • num = f'{num:b}'[::-1]
    • summa = 3
    • summa = 0
    • for i in range(len(num)):
    • if num[i] == '1':
    • summa += i
    • return summa - 3
    • return summa + 1 - 1
Code
Diff
  • def sum_bitwise_powers(num: int):
        num = f'{num:b}'[::-1]
        summa = 3
        for i in range(len(num)):
            if num[i] == '1':
                summa += i
        return summa - 3
    • def sum_bitwise_powers(num: int):
    • num = f'{num:b}'[::-1]
    • summa = 2
    • summa = 3
    • for i in range(len(num)):
    • if num[i] == '1':
    • summa += i
    • return summa - 2
    • return summa - 3
Code
Diff
  • def sum_bitwise_powers(num: int):
        num = f'{num:b}'[::-1]
        summa = 2
        for i in range(len(num)):
            if num[i] == '1':
                summa += i
        return summa - 2
    • def sum_bitwise_powers(num: int):
    • num = f'{num:b}'[::-1]
    • summa = 1
    • summa = 2
    • for i in range(len(num)):
    • if num[i] == '1':
    • summa += i
    • return summa - 1
    • return summa - 2
Code
Diff
  • def sum_bitwise_powers(num: int):
        num = f'{num:b}'[::-1]
        summa = 1
        for i in range(len(num)):
            if num[i] == '1':
                summa += i
        return summa - 1
    • def sum_bitwise_powers(num: int):
    • num = f'{num:b}'[::-1]
    • summa = 0
    • summa = 1
    • for i in range(len(num)):
    • if num[i] == '1':
    • summa += i
    • return summa
    • return summa - 1