about summary refs log tree commit diff
path: root/codechef/maxfun.py
diff options
context:
space:
mode:
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)