SCHOOL1-Editorial

PROBLEM LINK:

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

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

Author: laks
Tester: travelerkm23
Editorialist: laks

DIFFICULTY:

CAKEWALK.

PREREQUISITES:

Basic Knowledge of a string.

PROBLEM:

You and your friend are seeing the photos of your holdiays. When you input 1 means your photo and if entered 2 means your friend photo . Can you help to calculate the total number of your and your friend’s photo

input: -
First-line will contain integer N showing a total number of photo. further line showing 1 or 2 enter as per photo.

Output:-
For each input, the output is in a single line answer given by you and your friend total photos.

QUICK EXPLANATION:

In this, a problem you have to create a program in which you write while loop to enter all test cases then you should output total photos of friend 1 and 2.

EXPLANATION:

In this, you have to write code like this first, write while loop then un while loop check condition that is there 1 or 2 by if statement if present then, incrr=ement variable respectively and print final output that total photos pf 1 and 2 friends.
Otherwise “WRONG INPUT”.

SOLUTIONS:

[details=“Setter’s Solution”]
https://www.codechef.com/viewsolution/25772927
HELPED BY TESTER