题解 | #小欧的奇数#
小欧的奇数
https://www.nowcoder.com/practice/aef41039765b433998812b9e9cfe02c2
#include <stdio.h> int main() { int n, num; int even = 0, odd = 0; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%d", &num); if(num % 2 == 0) even++; else odd++; if(odd > 2) { printf("YES\n"); return 0; } else if(odd > 0 && even > 1) { printf("YES\n"); return 0; } } printf("NO\n"); return 0; }