in an ap,the first term of an arithmetic series is 5,the last term is 45 and the sum is 400. find the number of terms and common difference​