拿着AWM打人妖 • 17小时前
int main() {
int y, x, i, n, m;
scanf("%d %d", &n, &m);
i=0;
for (int x = 0; x <= n; x++) {
for (int y = 0; y <= n; y++) {
if (x + y == n && 2 * x + 4 * y == m) {
i = 1;
printf("%d %d\n", x, y);
}
}
} if(i==0) {
printf("NULL");
}
return 0;
}
评论:
请先登录,才能进行评论