I'd be surprised if it were possible to climb these three fells if travelling by rail in 24 hours to be honest, though you could still do a version of the challenge. My understanding is that it normally relies on getting to the head of Wasdale for about 4 am - clearly not possible by public transport!
As I say, of course, you could do a version of this challenge seeing how quickly you could do it. Fort William station is obvious for Ben Nevis - you could probably walk from there.
Dalegarth on the Ravenglass-Eskdale 'ratty' line is a good start point for a walk up Scafell Pike. Altneratively, a you'd have to get a train to Windermere, followed by a bus to Dungeon Ghyll, or a train to Penrtih, followed by a bus to Keswick and then to Seatoller.
I don't know Snowdonia as well as the others!
For obvious reasons, advance tickets might not be ideal when travelling in between the mountains! I'd suggest an Anytime single from Fort William to Preston, and an Anytime Day single from Preston to Blaenau Ffestiniog (presuming that the latter is your destination in Wales). There may be other splits between Fort William and Preston, but the Preston to Blaenau price looks very good to me.