题解 | #小欧的奇数#
小欧的奇数
https://www.nowcoder.com/practice/aef41039765b433998812b9e9cfe02c2
#include <stdio.h> #include <stdlib.h> int main() { int n,j,o; scanf("%d",&n); int a[n]; for(int i=0;i<n;i++){ scanf("%d",&a[i]); if (a[i]>10) { while (a[i]>10) { a[i]%=10; }if (a[i]%2==0) { o++; }else if (a[i]%2!=0) { j++; } }else if(a[i]<=10) { if (a[i]%2==0) { o++; }else if (a[i]%2!=0) { j++; } } } if (o>=2&&j>=1||j>=3) { printf("YES"); }else printf("NO"); return 0; }