וּנְתָנָ֛הּ יְהוָ֥ה אֱלֹהֶ֖יךָ בְּיָדֶ֑ךָ וְהִכִּיתָ֥ אֶת־כָּל־זְכוּרָ֖הּ לְפִי־חָֽרֶב׃
Yang Mahakekal, Allahmu, akan menyerahkannya ke dalam tanganmu, dan haruslah engkau membunuh semua laki-laki di dalamnya dengan mata pedang.
Rashi
ונתנה ה' אלהיך בידך means THEN THE LORD THY GOD WILL GIVE IT INTO THY HANDS — if you have done all that is prescribed in this section the Lord will in the end give it into your hands (Sifrei Devarim 200:6).
Sifrei Devarim
(Ibid. 20:13) "Then the L-rd your G-d will deliver it into your hands": If you do all that has been stated, in the end, the L-rd your G-d will deliver it into your hands.
Sifrei Devarim
"then you shall smite all of its males by the sword": I might think, even the children; it is, therefore, written (Ibid. 14) "but the women and the little ones … you shall take for yourself": — But perhaps the little ones of the females are meant! — Can you say this? Now if (in the war with) Midian, where the adult women were put to death, the little ones were spared, then here, where the adult women were spared, how much more so would the little ones be spared (and no verse would be needed to tell us that). It must be, then, that "little ones" here refers to the little ones of the males. "all of its spoil shall you take for yourself": I might think that their spoil should be forbidden; it is, therefore, written "its spoil shall you take for yourself, and you shall eat the spoil of your foes."