ac

 •  17天前


include

include

using namespace std;

int main() {

char s[35];
int o = 0, j = 0;
scanf("%s", &s);
for (int i = 0; i < strlen(s); ++i) {
	if (s[i] >= '0' && s[i] <= '9') {
		if ((s[i] - '0') % 2 == 0) {
			o++;
		} else {
			j++;
		}
	}
}
cout << j << ' ' << o;
return 0;

}


评论:

请先登录,才能进行评论