Actually, there are two other ways to be saved besides repentance and faith in Jesus Christ.
One, you must live a perfect life without sin. Jesus commanded us to do that in Matthew 5:48
Basically, that's keeping the law perfectly.
So, if you can live a sinless life, you're home free.
Two, Romans 2:14ff gives the other way. Live perfectly by your own personal moral code. That's what Paul meant when he talked about the Gentiles being a law unto themselves.
Since the law is written on their hearts, their conscience warns of the existence of a law. So if they can obey perfectly their own moral code, they're home free.
Of course, there are problems. None of us has ever been able to perfectly obey Jesus' command to be perfect. Oh, shoot, I'm in trouble then.
And no on has been able to live up to their own moral code. When their conscience kicks in, it's because they've violated the law written on their hearts. Oops, we all know how that works. Maybe I'm the only one who knew what was right and didn't do right.
Of course, even if we could get to the point where we no longer sin (some folks think they're there), it's too late. We're already sinned before.
So, the conclusion is obvious. Those who have never heard the gospel will not be judged for rejecting Jesus, of whom they have never heard. They will be judged against their own moral code.
And they will have no excuse.