Skip to content

Commit b8fdaa8

Browse files
authored
Create d881.py
1 parent 0a4b843 commit b8fdaa8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Basic/d881.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import sys
2+
3+
for s in sys.stdin:
4+
num = s.split()
5+
d = int(num[0])
6+
a = [1]
7+
b = [1]
8+
ans = 1
9+
for i in range(1, 50):
10+
a.append(a[-1] + b[-1])
11+
b.append(b[-1] + d)
12+
ans += a[-1]
13+
print(ans)

0 commit comments

Comments
 (0)