Can i get pregnant after?

rozey
Okayy so i had sex with my boyfriend a few hours before i got my period...and he finished inside me...can i be pregnant? And i also bought a test. And idk how many days after my period should i take it?