Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Pythonで次のアルゴリズムを実装するにはどうすればよいですか:
(ソース)
def getGraycodeRank(n, t): r = 0#range b = 0 for i in reversed(range(0, n)): if n - i IS IN t: #how to check it? b = 1-b if b == 1: r += 2^i return r