I can't get an answer anywhere for this very simple question.

On score attack mode on episode gladiolus, for the playstation 4 trophy "no pain no gain", to score 500,000 points on score attack - can you score the required amount of points and then quit off? And still earn the trophy? Or do you have to complete the entire thing, finishing with the required points?