Torrential rains triggered flash floods and landslides on the Indonesian island of Sumatra, killing at least 27 people, including a dozen children at a school, officials said on Saturday.