Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
MegaVerkruzo
Feb 9th, 2020
144
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
TAP
JavaScript | 4 hours ago | 10.69 KB
shell.php
PHP | 9 hours ago | 5.56 KB
IT & AI
1 day ago | 0.09 KB
my scers
1 day ago | 0.15 KB
Baccano!
2 days ago | 1.97 KB
TLOZ Windwaker - Windfall Island - Virtual Pi...
2 days ago | 1.57 KB
squar
2 days ago | 0.10 KB
my-pus
2 days ago | 0.09 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!