From 1403e3d1944d2449fd25dfea448d7d78bd721f94 Mon Sep 17 00:00:00 2001 From: SS240102222 Date: Sun, 17 Nov 2024 07:08:10 +0500 Subject: [PATCH] Update Young physicist.py I have Shortened the last if condition and added some spacing --- CodeForces python/Young physicist.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CodeForces python/Young physicist.py b/CodeForces python/Young physicist.py index a5c7fbb..5b88309 100644 --- a/CodeForces python/Young physicist.py +++ b/CodeForces python/Young physicist.py @@ -1,12 +1,12 @@ n=int(input()) -sx=sy=sz=0 +sx = sy = sz = 0 for i in range(n): - x,y,z=[int(v) for v in input().split()] - sx+=x - sy+=y - sz+=z + x,y,z = [int(v) for v in input().split()] + sx += x + sy += y + sz += z -if sx==0 and sy==0 and sz==0: +if sx == sy == sz == 0: print("YES") else: print('NO')