Fourth Additional District and Sessions Court judge B J Naik also imposed Rs 25,000 fine on each of the accused - Nishith (20) and Ashok (26) - failing which they would have to undergo additional two years imprisonment.
However, the court aquitted Abdul Sattar Ayub, a tea vendor at the railway station, for lack of evidence.
The 15-year-old girl from Odisha, who was at the station, was taken to a compartment and gangraped by the convicts on the pretext of boarding her onto a Goa-bound train.
The court said that the crime was gruesome and the convicts deserved life imprisonment.
The victim was found unconscious by a cleaner who informed police.