Created
August 23, 2022 20:08
-
-
Save modos/1515991c4be49d3f44f61aa7e2c8a588 to your computer and use it in GitHub Desktop.
خر در چمن فراوونه!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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