Hey dewd of dew,
Instead of just spoon feeding you the answer and freely doing the work, I am going to tell you how to figure this out yourself, please try not to jump into the meat grinder, keep your hands inside of the space ship at all times. Oompa loompa powers: Engage.
A little scorpion once told me that there is a program called google sketchup. I didn't believe him at first, but after he beat me in arm wrestling I had to listen, and listen well I did. I installed the program and drew out the dimensions. You don't have to do this, you can just make a box using cardboard and duct tape of similar dimensions. Anyway, I used the drawing technique because I am a scared of cardboard, it seems dangerous, this is a crippling phobia, cardboardphobia, there is a box opening service that I subscribe to, otherwise I'd never be able to get my all time favorite beef jerky.
Then, once you have your drawing in google sketchup (which costs a fortune, by the way, prepare to sell your kidneys, and maybe your offspring into slavery) you can draw in the dimensions of the batteries and move them around in THREEEE DEEEE SPACEEEE. You'll be all like, whoa man, this is perpetuating my imagination into reality through computational realization, then you'll probably need to take a nap so you can process your emotions.
So you draw two objects, the box and the batteries in general dimensions with padding planned in. You'll probably need about three years to complete this task, maybe more if the wolf master doesn't hand you his crystal charms. Then, you highlight the batteries, and move it into the box to see if it fits. And if they do, you'll probably be so happy.