We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a011602 commit 29a1256Copy full SHA for 29a1256
1 file changed
kattis/Forest for the trees/forest.shortest.vn.py
@@ -1,6 +1,6 @@
1
from math import gcd;a,b=map(int,input().split());c=gcd(a,b);a//=c;b//=c;d,e,f,j=map(int,input().split())
2
-d,f=sorted([d,f])
3
-e,j=sorted([e,j])
+d,f=[d,f].sort()
+e,j=[e,j].sort()
4
k=1
5
while k<c:
6
x=k*a;y=k*b;k+=1
0 commit comments