mikev: (Default)
def fun(t):
    if(t):
        print t
        k=1
        while(k&t):
            fun(t^k)
            k<<=1
    return

fun(31)   

Profile

mikev: (Default)
mikev

March 2018

S M T W T F S
    123
45678910
11121314151617
181920212223 24
25262728293031

Syndicate

RSS Atom

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 9th, 2025 03:14 am
Powered by Dreamwidth Studios