Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
MegaVerkruzo
Feb 9th, 2020
135
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
n = int(input())
k = int(input())
a = []
a.append((0, k - 1))
for i in range(0, n - 1):
a.append((a[i][1], (k - 1) * (a[i][0] + a[i][1])))
print(a[n - 1][0] + a[n - 1][1])
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Crypto Exploit
CSS | 44 min ago | 0.91 KB
+13,000$ in 2 days
CSS | 44 min ago | 0.91 KB
Untitled
55 min ago | 29.02 KB
Untitled
2 hours ago | 35.22 KB
Untitled
4 hours ago | 0.02 KB
Untitled
4 hours ago | 11.45 KB
Secrets.kdbx
5 hours ago | 97.10 KB
kube-prometheus-stack_servicecluster
YAML | 8 hours ago | 3.59 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!