Count the number of vowels in each word and compare the total text volume across two strings.
Problem
You are given two text strings. For each string, define its volume as the total number of vowels it contains, where vowels are a, e, i, o, u in either lowercase or uppercase.
Your task is to determine which string has the larger volume.
If the first string has a larger volume, print 1. If the second string has a larger volume, print 2. If both volumes are equal, print 0.
Notes
- Only English vowels count.
- All other characters are ignored.
- The comparison is based on total vowel count, not length or number of words.
Input Format
- The first line contains a string .
- The second line contains a string .
Output Format
Print a single integer:
1if has more vowels,2if has more vowels,0if they are equal.
Constraints
- Strings may contain letters, spaces, and punctuation.
- Comparison is case-insensitive for vowels.
- A simple linear scan is sufficient.
Example 1
Input
Hello Codeforces
Output
2
Explanation
Hello has 2 vowels (e, o), while Codeforces has 4 vowels (o, e, o, e).
Example 2
Input
AE ui
Output
0
Explanation
Each string contains 2 vowels, so the result is a tie.
Premium problem context
Unlock deeper context for this problem
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.