6. The inequality $(k-1) x+2021 \geq 0$ about $x$ has exactly three positive integer solutions. Then the maximum value of the integer $k$ is ( ).
A. -672
B. -505
C. -504
D. 504
E. 505
B

Translate the text above into English, please retain the original text's line breaks and format, and output the translation result directly.