The results of my code are the expected . But task always failed . I have try two approaches