OK here we are again...
Without making tests, it's easy to make a fast calculation.
Let's say a VIIb has an autonomy of 8000 miles at 8 knts (it's close and makes it easier).
We run it on the surface at 8 knts, this gives us 1000 hours (which is the unit used on boats for fuel consumption)
Assuming the weather stays nice and beautiful (for making things easier) our sub A will run 8000 miles @ 8 knots in 41.66 days (1000 hrs / 24)
The same sub B runs in the same nice weather conditions, but is submerged 12 hours @ 3 knts, reloads batteries 3 hrs @ 5 knts and runs surfaced 9 hrs @ 8 Knts every day. This gives us 36 + 15 + 72 = 123 miles a day, which is average 5.125 Knts.
Since our sub B uses its diesels only 12 hrs a day, the 1000 hrs of autonomy give us now 83.33 days, for a total distance of 123 * 83.33 = 10 250 miles
So although it will take twice the time, sub B will travel 2.250 miles i.e. roughly 28% further than sub A in the same weather conditions.
Merry Xmas to all of you..