From 2b91f9554b326aea138bd8a0acbfaa10d9ad59aa Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 15 Feb 2021 21:05:21 +0700 Subject: [codechef] Try CP again after almost a year --- codechef/maxfun.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 codechef/maxfun.py (limited to 'codechef/maxfun.py') 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) -- cgit 1.4.1