Back
Close

Happy snakes

Statement

 Goal

Snakes are happy when they wave their tongue out, ASCII snakes are no exception.

ASCII snakes have ASCII tongues, which appear as "-<" when facing right or ">-" when facing left.
The tongue is always at the (relative) beginning of the snake.
Snakes may have different shapes and lengths.


You need to output the percentage of happy snakes.
Input
Line 1: An integer N for the number of snakes
Next N lines: ASCII snakes
Output
Line 1 : The percentage of happy snakes, "%" symbol included
Constraints
1 ≤ N ≤ 100
Example
Input
1
...__/\_/\_/o-<
Output
100%

Game modes
Fastest, Shortest

Test cases
One happy snake Test
Input
1 ...__/\_/\_/o-<
Output
100%

One happy snake Validator
Input
1 ...__/\_/\_/\_/o-<
Output
100%

One sad snake Test
Input
1 ...__/\_/\_/o
Output
0%

One sad snake Validator
Input
1 __/\_/\_/o
Output
0%

One longer happy snake Test
Input
1 ...__/\_/\_/\_/\_/\_/\_/o-<
Output
100%

One longer happy snake Validator
Input
1 ...__/\_/\_/\_/\_/\_/\_/\_/\_/\_/o-<
Output
100%

One happy snake facing left Test
Input
1 >-o\_/\_/\__...
Output
100%

One happy snake facing left Validator
Input
1 >-o\_/\_/\_/\__...
Output
100%

Two different snakes Test
Input
2 ··=====8-< >-8====··
Output
100%

Two different snakes Validator
Input
2 >-8====·· ··=====8-<
Output
100%

A bunch of snakes Test
Input
4 >-o\_/\/\__... ··=====8-< ··===========8 ...__/\_/\_/o-<
Output
75%

A bunch of snakes Validator
Input
4 >-o\_/\/\__... ··=====8 ··===========8 ...__/\_/\_/o-<
Output
50%

A lot of snakes Test
Input
40 ··==========8 ··=====8 >-o\_/\/\_/\_/\__... >-o\_/\/\__... ...__/\_/\_/\_/\_/o-< 8======·· ··==========8-< o\_/\/\_/\_/\_/\_/\_/\__... ...__/\_/o 8======·· ...__/\_/\_/o-< ··==========8 ...__/\_/o ...__/\_/o o\_/\/\_/\_/\__... >-o\_/\/\__... ··=====8 ...__/\_/o ··=====8-< >-8======·· ...__/\_/\_/\_/\_/o-< ··=====8 >-o\_/\/\_/\_/\__... >-8======·· o\_/\/\_/\_/\__... >-8======·· >-o\_/\/\__... ··=====8-< >-o\_/\/\__... ...__/\_/\_/o ...__/\_/\_/o-< ...__/\_/\_/o-< ··==========8-< ...__/\_/\_/o-< ...__/\_/\_/o-< ··=====8 >-8======·· ...__/\_/\_/o ...__/\_/\_/o-< o\_/\/\_/\_/\_/\_/\_/\__...
Output
55%

A lot of snakes Validator
Input
80 ...__/\_/o ...__/\_/\_/o >-o\_/\/\_/\_/\__... ...__/\_/\_/o >-o\_/\/\__... ··=====8-< ...__/\_/\_/o-< ...__/\_/\_/\_/\_/o ··=====8 >-8======·· ...__/\_/\_/\_/\_/o ...__/\_/o ...__/\_/\_/\_/\_/o >-o\_/\/\__... o\_/\/\_/\_/\_/\_/\_/\__... >-8======·· ··=====8 ...__/\_/o o\_/\/\_/\_/\__... >-8======·· o\_/\/\_/\_/\_/\_/\_/\__... ...__/\_/o ...__/\_/\_/o ··=====8 ...__/\_/\_/o-< 8======·· o\_/\/\_/\_/\__... 8======·· ··=====8-< >-o\_/\/\__... ...__/\_/\_/o-< ...__/\_/\_/o-< 8======·· >-o\_/\/\_/\_/\__... ...__/\_/o >-o\_/\/\_/\_/\__... ...__/\_/\_/o-< ··==========8 o\_/\/\_/\_/\_/\_/\_/\__... ··=====8 ··==========8 >-o\_/\/\__... ··==========8 ...__/\_/\_/o-< >-o\_/\/\__... ...__/\_/\_/\_/\_/o ...__/\_/o ...__/\_/\_/o-< >-8======·· ··=====8-< >-o\_/\/\__... >-8======·· >-o\_/\/\_/\_/\__... 8======·· ··=====8 ··==========8 ··=====8 ··=====8 ...__/\_/\_/o-< ...__/\_/\_/o o\_/\/\_/\_/\__... o\_/\/\_/\_/\_/\_/\_/\__... >-8======·· ··==========8 >-8======·· ··=====8-< ...__/\_/\_/o-< o\_/\/\_/\_/\__... ··==========8 ··==========8 ...__/\_/\_/o-< ...__/\_/\_/o-< ··=====8 ...__/\_/\_/o-< ...__/\_/o ...__/\_/o ··==========8 >-o\_/\/\__... >-8======·· >-o\_/\/\__...
Output
45%

Solution language

Solution

Stub generator input