-
-
Save AngelOnFira/69e9b494735ae1c156eb04ad0cdae16b 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 | |
| from collections import defaultdict | |
| t=sys.stdin.readline() | |
| l=[] | |
| while t: | |
| l.append(int(t.strip())) | |
| t = sys.stdin.readline() | |
| # l = l[1:] | |
| max = 0 | |
| for i, first in enumerate(l): | |
| a = l[i + 1:] | |
| for second in a: | |
| if second - first > max: | |
| max = second - first | |
| print(max) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment