estimated $51 billion, a record for any Olympics.
Only time will tell if the project, on which Putin has staked his prestige, was worth it, as Russia faces the formidable challenge of turning Sochi and the surrounding areas into a year-round sports and entertainment hub.
Bach said Sochi had undergone an "amazing transformation" from somewhere that looked more like a "Stalinist-style sanatorium city" in the mid-1990s to an Olympic host city with state-of-the-art venues.
"It was terrible then. Seeing it 20 years after this transformation is amazing."
For now Russian officials are basking in the glory of an event they believe helped them build bridges with the West, with which Moscow has had uneasy relations under Putin.
"The friendly faces, the warm Sochi sun and the glare of the Olympic gold have broken the ice of scepticism towards the new Russia," Deputy Prime Minister Dmitry Kozak, also Putin's Olympics organiser, said at the weekend.
The medals tally was an unexpected bonus after Russia mustered just three golds in Vancouver four years ago to place 11th in the rankings.
The only regret for Russian fans was that the men's ice hockey team progressed no further than the quarter-finals.
Victory gave Canada a sweep of the ice hockey gold medals for a second consecutive Olympics. The women stormed back from 2-0 down in the last four minutes against the United States to break American hearts on Thursday.
The world's gaze then turned to the final act of the Feb. 7-23 Games, the closing ceremony, which painted Russia in far softer colours than the muscular, assertive opening spectacle.
The show's producers deliberately replicated the embarrassing technical hitch from the opening ceremony, when one of five Olympic rings failed to open.
In similar fashion, while dancers in shimmering silver tops formed four perfect rings, one group remained in a tight formation, and only opened to complete the symbol when spectators had cheered the joke loudly.
The sense of national pride at the home team's achievements was palpable as huge roars erupted for the Russian team as they paraded past the crowds.
"Well done!" chanted tens of thousands of Russians as Legkov, Maxim Vylegzhanin and