In Romans 3:10-18 Paul makes six “No one is righteous” etc quotations from the Old Testament.
If we bother to read the context of those quotations, we see that the passages he is quoting from (mostly Psalms) are not actually asserting that no one is righteous, rather that unrighteousness is confined to a specific group at a specific time:
The Gentiles who are currently invading, the Jews who are oppressing the poor, the enemies of the writer etc.
Similarly the writers believe that some people are righteous: The Israelites who are being invaded by wicked Gentiles, the poor and humble who are being oppressed by their countrymen, the writer himself and those around him whom his wicked enemies are attacking.
It is from these passages that Paul is quoting. To try and extract from them the idea that every single person in the world is horribly fallen and wicked is a complete falsification of the text... that is not what any of these passages are saying.
I don't believe Paul was so stupid as to misunderstand 6 out of 6 passages he quotes. Especially as 5 of them are Psalms, Paul was probably intimately familiar with all of them, as they would have been sung regularly.
So what is Paul's point? Looking at Romans, his point is clear:
Some Jews and some Gentiles at specific times in history were wicked.
That's the point Paul is trying to make, and he has chosen 6 scriptural passages that agree with that point.
In the greater context of his argument, he is trying to prove that the Jews are not magically protected from wickedness merely because of their Jewishness. And so he lists in Romans 2 many crimes common to Jews of his own day, and then in Romans 3 turns to scripture and notes that scripture speaks in similar words regarding evil Jews and evil Gentiles, it does not bother to distinguish one from the other. Jewish wickedness is not any better in God's eyes than is Gentile wickedness, and thus correspondingly Jewish righteousness is not any better in God's eyes than Gentile righteousness (which is what Paul is trying to prove).
Paul is not trying to allege that every human being is evil (he doesn't believe that). He is making a point about a lack of difference between Jewish evil and Gentile evil by speaking of the historical unrighteousness of specific people in specific times and specific places.