Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- basis = int(input())
- increment = float(input())
- step = 0
- stone = 0
- marble = 0
- lapis = 0
- gold = 0
- for i in range(basis, 0, -2):
- size = i * i
- step += 1
- if i < 3:
- gold = size * increment
- else:
- stone += (i - 2) ** 2 * increment
- decorate = (i * 4 - 4) * increment
- if step % 5 != 0:
- marble += decorate
- else:
- lapis += decorate
- print(f'Stone required: {math.ceil(stone)}')
- print(f'Marble required: {math.ceil(marble)}')
- print(f'Lapis Lazuli required: {math.ceil(lapis)}')
- print(f'Gold required: {math.ceil(gold)}')
- print(f'Final pyramid height: {math.floor(step * increment)}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement