A few months ago, I was interviewing for a job, and completed a coding test comprising of 3 separate coding tasks. They were a Java house, and I'm not a Java guy, but they said I could do the coding in whatever language I liked (there were various compiler options in the drop down). So, I said "I'll do the first one in .Net", completed it and then said "Well, let's do JavaScript for the next one, and Java for the last one".I just failed the Amazon coding test so hard. Didn't even get one of the two done, which is mind boggling to me. All I do is code, and code fast, and somehow in this one instance I just froze at the top. Eventually my brain kicked in, but it wouldn't have mattered. It wasn't until there was only fifteen minutes left that I decided to print the input at the start, only to discover it wasn't the input it was supposed to be, so even if I coded it perfectly, it would never have worked. I honestly have no idea what to do with that.
This was an "open book" test, meaning I could use any web resources I wanted, so long as I finished on time, and it was a screen share, so they could see what it was I did. So I finished the JavaScript one just fine (since I've been using it since it was invented). Then on the last one, I reminded them "I've never coded in Java, but I know how to use Stack Overflow". I finished that one too.
They said no one had ever completed all 3 before. And I still didn't get the job.
All that's to say, don't beat yourself up too much over it. These things are super stressful, and I found myself floundering at times on things I knew well. I had a good 5 minutes of freeze-up at the start, but thankfully was able to shake it off and get 'er done. I think most places just want to see you work under pressure and the 'completion rate' is of lesser importance.