Two different programs are written to calculate the sum of the first n n\,n odd positive integers.
n = int(input("Enter a positive integer: "))
total = 0
for i in range(1, n + 1):
total = total + (2 * i - 1)
print(total)
n = int(input("Enter a positive integer: "))
total = n * n
print(total)
Which of the following statements is true about the efficiency of these programs?
Both programs are equally efficient.
Program A is more efficient than Program B.
Program B is more efficient than Program A.
The relative efficiency of the two programs cannot be determined without knowing the value of nnn.