Skills101
← All coding problems

Count Vowels

easyBasics+10 XPTime limit 2s

Count how many vowels (a, e, i, o, u, upper or lower case) appear in a line of text.

Input: one line s.

Output: the number of vowels.

Constraints: 1 ≤ length of s ≤ 10⁵.

Sample input 1

Hello World

Sample output 1

3

Sample input 2

Skills101

Sample output 2

1

Read input from standard input and print the answer to standard output. Your code runs in a secure sandbox against the samples (Run) and hidden tests (Submit).

Loading editor…

Log in to run and submit your code — it's free.