Prescription Drug and drug question

I might accept a position for a defense contractor that requires successful completion of a Top Secret security clearance investigation. The job does not involve intel/counterintel, so no polygraph. But obviously I intend to be as truthful as possible. With that I’ll just go ahead and cut to the chase:

About 5 months ago I was at a bachelor party and used adderall. I do not have a prescription for adderall, and I imagine, ‘wanting to stay focused for a night out on the town,’ is not following with the regularly prescribed usage directions. Use occurred one time on two consecutive nights (friday and saturday before going out).

Honestly, I just did not realize that prescription drugs were included in the security clearance investigation. I realize they can be abused just the same as illegal drugs, but at the time I stupidly assumed it would not be an issue. There were other illegal drugs present that weekend, which I had no interest in using. Had I known using the adderall would cause an issue with obtaining a security clearance, I would absolutely not have used it.

For the sake of full disclosure within 7 years: About 5 years ago, almost an identical situation occurred except instead of adderall it was cocaine. Use was limited to several instances (maybe 2-4) over 2 days.

No other drug use (illegal or unprescribed prescription drug) occurred within the last 7 years.

Will the above prevent me from obtaining a top secret clearance?

Thank you

In all actuality, the cocaine use is more serious than the prescription drug use because it is a deliberate act to use a known illegal drug, versus illegally using a legal drug. You did not mention drug use beyond the 7 years, but that may be a consideration as well. You should be prepared to answer tough questions about the what, why, when, how, and how many times for all illegal drug use before a clearance is granted.