Created
May 19, 2018 15:53
-
-
Save deviantfero/14d60f1c146e25afa936cb0434e07eab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import sys | |
for l in sys.stdin: | |
inp = [int(x) for x in l.split(' ')] | |
a = int(inp[0] / inp[1]) if inp[1] != 0 else 0 | |
t = 2 * inp[1] | |
print(inp[0] * t + a * inp[1]**2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment