The Japanese surrendered after the two atomic bombs were dropped. Therefore, these two massive strikes on civilian populations were justified.
It doesn't work that way. Everything I've read indicates that the U.S. only had two atomic bombs at the time, so there must have been a scenario in place to deal with a situation where the Japanese did not surrender after the second one was dropped. If the Japanese didn't surrender after the firebombing of Tokyo in March of 1945, then surely there couldn't have been any certainty that the destruction of Hiroshima and Nagasaki would have different results.
Needless to say we were not looking for certainty of the results. There were other alternatives and all of them were worse.