Beta Round #63-A: Young Physicist
解法
for文を習いたての人のための例題。
#include <stdio.h> int main(){ int x=0, y=0, z=0, tx, ty, tz; int i, n; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d%d",&tx,&ty,&tz); x += tx; y += ty; z += tz; } if(x||y||z) puts("NO"); else puts("YES"); return 0; }