ב. וְהָיָה אִם בִּן הַכּוֹת הָרָשָׁע וְהִפִּילוֹ הַשֹּׁפֵט וְהִכָּהוּ לְפָנָיו כְּדֵי רִשְׁעָתוֹ בְּמִסְפָּר .
‘and it shall be, if the guilty one has incurred [the penalty of] lashes, that the judge shall make him lean over and flog him in front of him, commensurate with his crime, in number.’
ג. אַרְבָּעִים יַכֶּנּוּ לֹא יֹסִיף פֶּן יֹסִיף לְהַכֹּתוֹ עַל אֵלֶּה מַכָּה רַבָּה וְנִקְלָה אָחִיךָ לְעֵינֶיךָ
‘He shall flog him with forty [lashes]; he shall not exceed, lest he give him a much more severe flogging than these [forty lashes], and your brother will be degraded before your eyes.’
This is the famous parsha of malkos (flogging or lashes).
The Gemara in Makkos 22a asks “How many times do we flog the receiver? – Because the passuk writes, “be’mispar arboim” (in the number 40) and so we understand that the number must be close to 40 – therefore we give him 39 strokes. However, R’Yehuda follows the line of the pasuk and says that he receives 40 strokes for a complete flogging.
When the Chiddushei Ha’rim was young, a man asked him the following question: Is there a chance that one day a person will receive the same amount of lashes according to both R’Yehuda and the Chachomim ?
The young bochur gave a brilliant answer: A Shliach Beis Din (someone who works for the Beis Din and carries out the punishments) transgressed 39 issurim in the Torah and therefore deserved 39 floggings. However, before receiving his punishments, he was still doing his job in Beis Din and was flogging someone else. He gave the person 40 strokes. Now, according to R’Yehuda, who says that a person receives 39 strokes, this Shliach Beis Din has given too many, therefore he has transgressed the issur of “Lo Yosif Le’hakoso”(in passuk 3), and he now must receive a further set on top of the 39 he deserves already. So, altogether, he is obligated to receive 40 sets of 39 strokes.
According to the Chachomim, who says that a person receives 40 strokes, this Shliach Beis Din has not given too many, and therefore, he is obligated to receive his original 39 floggings, each consisting of 40 strokes. When calculated it works out that 39 floggings times 40 strokes = 40 floggings times 39 strokes; so according to both R’Yehuda and the Chachomim, he receives the same amount.
Upon hearing this answer, the man was so impressed with the sheer genius of the young man that he took the Chiddushei Harim to be his son-in-law.