Mt. Gox, the troubled exchange for the virtual currency Bitcoin, filed for bankruptcy protection on Friday and said that it might have lost 750,000 of its customers’ coins, essentially all of them, in a hacking attack. The Tokyo-based exchange, which warned this month of a software flaw that may have allowed hackers to defraud it of Bitcoins, had halted all trading this week. Mark Karpeles, the company’s chief executive, wearing a suit instead of his usual T-shirt, bowed in contrition and apologized in Japanese at a press conference in Tokyo. “There were weaknesses in the system,” he said. “I’m truly sorry to have caused inconvenience.” He said that the exchange had most likely lost 750,000 of its customers’ Bitcoin holdings and more than 100,000 of its own coins, or more than $450 million worth.Mt. Gox had said on its website on Wednesday that it was still “working very hard” toward a resolution.