“The bottom line, games like this, when you don’t win, you don’t win,” Richard said after the bottom of the Cubs’ lineup — most notably former Padres Cody Ransom and Scott Hairston — accounted for all five runs charged to Richard as the Padres dropped a 5-3 decision.

“It stings,” continued Richard. “I’m getting there. But we’re in it to win. I wish I had done a better job.”

Hairston and Ransom connected for back-to-back homers off Richard in the third to erase an early one-run Padres lead. Ransom broke a 3-3 tie with a two-out RBI single in the bottom of the sixth.

The Cubs scored five runs on seven hits and two walks off Richard in 5 2/3 innings as the left-hander fell to 0-3 while his earned-run average remained at 7.94.

There were signs of improvement in Richard.

Black said Richard’s velocity was as good as it has been all season. And he got 13 outs on ground balls. But he fell behind Hairston and Ransom on the back-to-back homers and left a pitch up to Ransom with the score tied and two out in the bottom of the sixth.

“Unfortunately, I fell behind guys at the worst times,” Richard said.

“I liked Clayton’s velocity,” Black said. “It looked like the arm strength was back to where it was before he was ill. ...

“We just couldn’t get the big hit. We got the runners (in scoring position), we just couldn’t get the big knock.”

The Padres had ample opportunities, but were 1-for-10 with runners in scoring position, stranding seven runners at second and third and getting nothing out of a bases-loaded, one-out situation in the seventh.

The only hit in a RISP situation was Yonder Alonso’s two-run, two-out, opposite-field, game-tying single in the fifth. After that hit, the Padres went 0-for-5 in RISP situations.

The biggest missed opportunity came in the seventh. Singles by Everth Cabrera (who had three hits) and Chris Denorfia leading off the inning and a one-out walk drawn by Carlos Quentin loaded the bases. But Alonso was called out on a check-swing third strike by third base umpire Dan Iassogna and Jedd Gyorko topped out to third to end the threat.

Although it didn’t appear that Alonso swung on the pitch, the first baseman would make no excuses.

“It is what it is,” he said of Iassogna’s call on the check swing. “I had two other pitches to hit and I didn’t execute. I don’t want to sit here and talk about a call. I had the chances before that pitch.”

In the eighth, pinch-hitter Kyle Blanks singled with two out and reached third on Cabrera’s third hit, a double. But Denorfia topped the first pitch from reliever Kevin Gregg back to the mound to leave the tying runs on.

Meanwhile, Hairston, Ransom and Darwin Barney — the Cubs’ 6-7-8 hitters — were a combined 5-for-10 with five RBIs and four runs scored.

No. 8 hitter Barney, who entered the game batting .167, greeted reliever Anthony Bass with a two-out double just inside the right-field line to give the Cubs their final run in the sixth.

In a somewhat embarrassing bottom of the second, the Cubs took a 2-1 lead on the back-to-back homers by Hairston and Ransom.

Hairston, who platoons in right field against left-handed starters, pulled a 3-and-1 pitch into the season down the left-field foul line. Ransom, who was 0-for-11 with five strikeouts for the Padres earlier this season before being claimed by the Cubs off waivers, followed with a drive to center off a full-count pitch.

The homers were the fifth and sixth hit off Richard this season.

The Cubs expanded their lead to 3-1 in the fourth on a leadoff double by catcher Wellington Castillo and a two-out single by Barney.