27 April 2017

Metro Card

My solution:
int[] metroCard(int lastNumberOfDays) 
{
    return lastNumberOfDays == 28 || lastNumberOfDays == 30 ? new [] { 31 } : new [] { 28, 30, 31 };
}

Previous Next