The remarks come as Trump ordered Pentagon officials to cut short joint exercises with the South Korean military.
He wrote in a Sunday social media post that they sent a message to Pyongyang that was "totally inappropriate and hostile, to a Country that, as long as Donald J. Trump has been President, has been unthreatening and respectful".
During Trump's first term, Kim called Trump a "mentally deranged US dotard" and threatened that he had use of a "nuclear button" on his desk.
The leaders' relationship cooled after face-to-face meetings in 2018 and 2019, including a brief exchange at the demilitarised zone between the Koreas in which Trump became the first sitting US president to step into North Korean territory.
"I know Kim Jong Un very well, and he's going to be fine as long as we have a smart president," Trump told reporters Wednesday during a tour of the helipad he is constructing on the White House's historic south lawn.
"The fact that I get along with him - that's a good thing, not a bad thing."
There have been varying estimates by experts over the years on how many nuclear weapons North Korea has.
"He has 57 very powerful nuclear weapons They should have never allowed it. If I were president, I wouldn't have allowed it. But he's got them," Trump said.
In June, the Stockholm International Peace Research Institute estimated that North Korea has "possibly assembled around 60 warheads, possesses enough fissile material to produce at least 30 more".