Amazon.com Inc. rose the most in three months after posting a smaller operating loss than analysts had predicted, suggesting that the world’s largest online retailer is doing a better job managing rising costs.