问题 选择题 已知函数f(x)=log2x,x>02x,x≤0.若f(a)=12,则a=( )A.-1B.2C.-1或2D.1或2 答案 令f(a)=12则a>0log2a=12或a≤02a=12,解之得a=2或-1,故选C.