summaryrefslogtreecommitdiff
path: root/2010/qual/b/b.py
diff options
context:
space:
mode:
Diffstat (limited to '2010/qual/b/b.py')
-rw-r--r--2010/qual/b/b.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/2010/qual/b/b.py b/2010/qual/b/b.py
index d08f928..26c0e9c 100644
--- a/2010/qual/b/b.py
+++ b/2010/qual/b/b.py
@@ -10,11 +10,7 @@ for i in xrange(c):
t = map(int, f.readline().strip().split(' ')[1:])
l = [abs(x - t[0]) for x in t]
g = reduce(gcd, l)
-
- if t[0] % g == 0:
- r = 0
- else:
- r = g - (t[0] % g)
+ r = 0 if t[0] % g == 0 else g - (t[0] % g)
s = "Case #%d: %s\n" % (i+1, r)