The correct answer is D. Mahapadma Nanda.
Buddha was born in Lumbini, Nepal, in the 6th century BCE. He died in Kushinagar, India, in the 5th century BCE. Mahapadma Nanda was born in the 4th century BCE and died in the 3rd century BCE. Therefore, Mahapadma Nanda was not contemporary to Buddha.
Bimbisara was the king of Magadha from 544 to 491 BCE. He was the father of Ajatshatru, who was the king of Magadha from 491 to 461 BCE. Udayin was the king of Magadha from 461 to 413 BCE. All three of these rulers were contemporary to Buddha.
Mahapadma Nanda was the founder of the Nanda dynasty, which ruled over Magadha from 345 to 321 BCE. He was a powerful ruler who conquered many kingdoms. However, he was not contemporary to Buddha.