题解 | #牛牛的平面向量#
牛牛的平面向量
https://www.nowcoder.com/practice/0e0d472d6a30469ab90d8b0aef7f81fe
#include <stdio.h> struct vector{ int x; int y; }; int main() { struct vector sum = {0, 0}; int n; scanf("%d", &n); for(int i = 0; i < n; i++){ int a, b; scanf("%d %d", &a, &b); sum.x += a; sum.y += b; } printf("%d %d", sum.x, sum.y); return 0; }