-
-
Save zhrkvl/eb5f271c282504ec6458 to your computer and use it in GitHub Desktop.
lelpas
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
| withFile = 0 | |
| if(withFile == 1): | |
| fin = open('input.txt', 'r') | |
| fout = open('output.txt', 'w') | |
| def getl(): | |
| if(withFile == 0): | |
| return input() | |
| else: | |
| return fin.readline() | |
| def printl(s): | |
| if(withFile == 0): | |
| print(s) | |
| else: | |
| fout.write(str(s)) | |
| def get_arr(): | |
| x = getl().split(' ') | |
| if(x[-1] == ''): | |
| x = x[:-1] | |
| return list(map(int, x)) | |
| n = get_arr()[0] | |
| if(n % 2): | |
| print(int((n-1) / 2 - n)) | |
| else: | |
| print(n / 2) | |
| if(withFile == 1): | |
| fin.close() | |
| fout.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment