Train tickets from Shanghai to Yanzhou
I suggest you take these trains, leave in the afternoon and arrive in the morning.
K3 14 Details Shanghai-Yanzhou 17:52-08:39 Air-conditioned Express 14 hours 47 minutes hard seat 106 Yuan hard sleeper 197 yuan.
1228/ 1229 Shanghai-Yanzhou 2 1:0 1-08:09 air conditioning express 1 1 hour 8 minutes hard seat 94 yuan hard sleeper 185 yuan.
K372/K373 Shanghai-Yanzhou 2 1:07-07:23 Air-conditioned Express 10 hour 16 minute hard seat 106 yuan hard sleeper 197 yuan.
K76/K77 Shanghai-Yanzhou 22: 16-07:46 Air conditioning fast 9 hours and 30 minutes hard seat 106 Yuan hard sleeper 197 yuan.
The weather in Shandong is not very cold now, about ten degrees.
Just take a bus from Yanzhou bus station to Qufu, just opposite the railway station. There is a shuttle bus to Qufu.