单选题

运行下面程序,输入4,输出的结果是(    )。

n = int(input())
a = 1
for i in range(2, n + 1):
    a = a + i
print(a)
A

8

B

10

C

12

D

14

赣ICP备20007335号-2