You are not logged in. Please login at www.codechef.com to post your questions!

×

REVENG01 - Editorial

PROBLEM LINK:

Practice

Contest

Author: Ankit Kathuria

Tester: Anuj Gupta

Editorialist: Akshat Jain

DIFFICULTY:

SIMPLE

PREREQUISITES:

Interest in Coding

PROBLEM:

Finding the problem is the first task based on the input, output format and exe file provided. Then think the logic and code the same.

QUICK EXPLANATION:

The task in this problem is to count the number of vowels, provided the input contains spaces and also strings after integer are input.

EXPLANATION:

• After having number of test cases as input, each test is to be inputted and processed. Each test case contains a string in which number of vowels is to be calculated. This can be done simply by comparing the string character by character with vowels.

• Things to remember are firstly, it may have both lower and upper case characters. Secondly, in languages such as C++, after inputting the number of test cases (int) string is to be inputted but we have to flush the new line character first. This can be done by using getline after having int as input so as to flush the new line character in buffer.

• Finally, functions such as getline inspite of cin in c++ etc must be used due the presence of blank spaces in string inputs.

AUTHOR'S AND TESTER'S SOLUTIONS:

Author's solution can be found here.

Tester's solution can be found here.

asked 09 Oct '16, 03:08

akshatjain2209's gravatar image

1★akshatjain2209
42
accept rate: 0%

edited 10 Oct '16, 17:00

admin's gravatar image

0★admin ♦♦
19.8k350498541

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×15,710
×1,914
×1,173
×644
×13
×1

question asked: 09 Oct '16, 03:08

question was seen: 776 times

last updated: 10 Oct '16, 17:00