Twenty-two others died on the crossing from Thailand after fleeing the military dictatorship in Myanmar, navy officer Tedi Sutardi told The Associated Press, citing witness accounts.
Their small wooden boat was discovered by fisherman Monday off Aceh's coast in northern Sumatra and towed to shore. The 40-foot vessel had no engine and the passengers had run out of food and water, Sutardi said.
"They were standing on the boat for 21 days because there was no space to sit," he said. "It is a miracle they survived."
It was the second load of Rohingyas, a stateless Muslim group facing decades of persecution in Myanmar, to arrive in Indonesia in a month.
The survivors recounted being beaten and set adrift by Thai authorities, Sutardi said. Around 20 were rushed to a local hospital, he said.
A witness told investigators the group was among 1,000 Rohingyas working in Thailand as migrant laborers, Sutardi said. They spoke of being forced to leave Thailand on nine motorless boats in December after being detained as illegal workers.
Some of them were beaten and "we could see they had black and blue marks on their backs," Sutardi said.
A group of 62 barefoot, disheveled Rohingya migrants facing illegal entry charges in a Thai court last week pleaded not to be sent back to Myanmar where they said they were beaten, whipped and warned not to return by soldiers.
The Myanmar Ahlin, a state-controlled newspaper in Myanmar, said that foreign media had suggested that the group of Rohingya found off Thailand's coast last week came from Myanmar. That was not possible, the newspaper said.
"Rohingya people are not among Myanmar's more than 100 ethnic minority groups," the newspaper said.
Faced with persecution because they are Muslims living in a Buddhist country, the Rohingya, who number about 800,000 in Malaysia, have fled abroad for decades. As many as 2 million have set up communities from Saudi Arabia to Malaysia where most work illegally.
About a half-million Rohingya escaped Myanmar during military crackdowns in 1978 and 1991, the majority of them moved to Bangladesh. Many remain exiled in Pakistan, Saudi Arabia, the United Arab Emirates, Thailand and Malaysia.