SCHOOL06-Editorial

PROBLEM LINK:

Practice : https://www.codechef.com/problems/SCHOOL06

Contest :https://www.codechef.com/COSK19TS

Author: laks
Tester: travelerkm23
Editorialist: laks

DIFFICULTY:

CAKEWALK.

PREREQUISITES:

Basic Knowledge of a string.

PROBLEM:

you have given a string and you should calculate the s present in the string. If you are able to calculate s then its pretty good

Input:

  • First line will contain string N, shows string of input entered.

Output:

  • For each testcase, output in a single line answer given the total number of s in given string;

Sample Input:

shalini

Sample Outut:

1

QUICK EXPLANATION:

In this, a problem you have to create a program in which you should enter the number containing five or not your choice and output should give number of s present in input.

EXPLANATION:

In this, you have to write code like this first, you have to write string then write for loop till the end of the string then write if statement with condition that for each element in string check s is present or not if yes increment variable otherwise not then, finally print the variable.

SOLUTIONS:

[details=“Setter’s Solution”]
https://www.codechef.com/viewsolution/25772377