Quiz Catalog

Catalog of quizzes

a, b = 3, 4

print(a.bit_length(), b.bit_length())
2 3
  • int/operation/bit_length
  • int/literal

a, b = 3, 4

print(a.bit_count(), b.bit_count())
2 1
  • int/operation/bit_count
  • int/literal

a, b = 424411453, 3122871
lst = divmod(a, b)
res = lst[0] * b + lst[1]

print(res == a)
2 1
  • int/operation/divmod
  • int/literal