first, piranha are schooling fish and do best in groups of 4-6. second, this species grows to 8-12 inches. you cannot maintain even one in a ten gallon tank, let alone a school of them.
as for living for 5 years in five gallons? i strongly doubt that. a fish can "survive" some mistreatment but if you're going to keep fish as pets, it becomes your responsibility to maintain them such that they thrive, not survive. you might survive living in a closet for months, you could pee in a bucket, and once a day someone would slide some food under the door and empty your bucket. think you'd live a long and healthy life? well neither would a 12 inch fish in ten gallons.