It said incorrect sol. but correct for one enemy.
It worked for me by testing every possible combinations.
First I was trying to use my brain, but then, just went with the easy bruteforce solution.
I think that it is not a good task. Here math doesn’t work, only dumb ways.