The North Korean boat used 40mm cannon. I imagine the SK vessel used much the same.
Really doubt it was 40mm cannon. SK’s patrol boats don’t mount armor capable of defeating 40mm. There would have been more damage and casualties on the SK boat if the NK’s had had 40mm.
What’s more likely is that the NK boat mounted 14.7mm Soviet-design heavy machine guns - which won’t penetrate the armor of the SK boats.
The SK boat mounted (and according to the article, used) its 40mm cannon.