Skip to content

Instantly share code, notes, and snippets.

@modos
Created August 23, 2022 20:08
Show Gist options
  • Save modos/1515991c4be49d3f44f61aa7e2c8a588 to your computer and use it in GitHub Desktop.
Save modos/1515991c4be49d3f44f61aa7e2c8a588 to your computer and use it in GitHub Desktop.
خر در چمن فراوونه!!
number = (input()).split(" ")
a = int(number[0])
b = int(number[1])
l = int(number[2])
sums = 0
for i in range(1, l + 1):
if i % 2 != 0:
sums += a
else:
sums += b
print(sums)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment