I needed HELP!!! Quick as possible

Can you take a pregnancy test two weeks after sex and it be accurate or do you know how soon can you