• + 0 comments

    I'm sharing my functional solution if anyone needs it. Its a lil convoluted but I thought if statements would be too boring so I did this:

    n = int(input().strip())
    
    m='Weird'*(n%2)
    
    l=((-(math.floor((n-6)/10000)))*(-(n%2-1)))*'Not Weird'
    
    o=((-(math.ceil((abs(math.floor((n-6)/15)))/10000)-1))*(-(n%2-1)))*'Weird'
    
    p=(((math.floor((n-21)/10000))+1)*(-(n%2-1)))*'Not Weird'
    
    print(m+l+o+p)