include <stdio.h>; int main() {
int a, b, c, d, s; scanf("%d%d%d%d%d", &a, &b, &c, &d, &s); if (a + b == s || a + c == s || a + d == s || b + c == s || b + d == s || c + d == s) {
printf("1");
} else {
printf("-1");
}
return 0; }
include <stdio.h>; int main() {
int a, b, c, d, s; scanf("%d%d%d%d%d", &a, &b, &c, &d, &s); if (a + b == s || a + c == s || a + d == s || b + c == s || b + d == s || c + d == s) {
printf("1");
} else {
printf("-1");
}
return 0; }
登录后即可回复本帖,与出题人和同学一起讨论。
登录