Traveling through the Tang Dynasty, he became the scapegoat in the imperial examination. Others were reciting poems and composing poems, but Mo Bai took out his calculation chips and performed calculations in court - the supervisory censor sneered: "This man is crazy, drag him out and kill him!" But when the Turkic army came to the city, he used the Pythagorean theorem to measure distances, borrowed geometric arrays to set up formations, and shot an arrow through the enemy's flag. The emperor asked in surprise: "What kind of trick is this?" Mo Bai calmly threw out the equation set: "Your Majesty, do you want to settle the accounts of the treasury?"