Well, I haven't gone those distances yet.
For a HIM... you kind of have to figure out what your butt can handle. My cousin recently did one in his tri shorts. I know my butt could never go that far without a ton of padding under my arse. I kind of imagine hitting a port-o-john and changing into my bike shorts in there. It might work?
For an IM... there are changing tents so you can dry off and put on real cycling shorts.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather, to skid in broadside thoroughly used-up, totally worn out, and loudly proclaiming: WOW WHAT A RIDE!!!!"