about summary refs log tree commit diff
path: root/codechef/maxfun.py
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2021-02-15 21:05:21 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2021-02-16 14:57:43 +0700
commit2b91f9554b326aea138bd8a0acbfaa10d9ad59aa (patch)
tree10053cf99e42711999d33b422a8735c5367d339f /codechef/maxfun.py
parent0cf49da1527983b9d165cd394b82c6bcbcafca60 (diff)
downloadcp-2b91f9554b326aea138bd8a0acbfaa10d9ad59aa.tar.gz
[codechef] Try CP again after almost a year
Diffstat (limited to 'codechef/maxfun.py')
-rwxr-xr-xcodechef/maxfun.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/codechef/maxfun.py b/codechef/maxfun.py
new file mode 100755
index 0000000..fa0f64f
--- /dev/null
+++ b/codechef/maxfun.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+for i in range(int(input())):
+    input()
+    a = list(map(int, input().split()))
+    print(max(a)-min(a)<<1)