Justin Bieber had his ass up in the air during his short stint in jail ... impressively doing 23 1/2 pushups in 28 seconds.
The jailhouse video -- obtained by TMZ -- shows Justin in his cell after being busted last month in Miami Beach for DUI and resisting arrest.
It's unclear what possessed him to show off his physical prowess, but he seemed excited about upping his cred.
Law enforcement tells TMZ ... there's one part of the 9 hours of video which shows Justin clearly under the influence. Frankly, we've looked at the video and Justin doesn't seem obviously under the influence ... at all.