FR 5316 then FR 5997 at Madrid
Rome → Madrid → London Stansted
Timetable, Madrid time
23:40FR 5316 from Rome at the gate
18:55FR 5997 to London Stansted leaves the gate
19 h 15 apart on the timetable, overnight
FR 5997 leaves 19 h 15 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.