meetforever/GRPO_CL huggingface dataset:
user: # Task

John won the championship of a TV show. He can get some bonuses.

He needs to play a game to determine the amount of his bonus.

Here are `n` rows and `m` columns of cards were placed on the ground. A non-negative number is written on each card.

The rules of the game are:

- Player starts from the top-left coner, walk to the bottom-right coner. 

- Players can only walk downward or right. 

- The sum of the numbers collected by the players will be used as the bonus.

John has two chances to play this game on a game map. Specifically, when John finishes the game, the card on his path will be removed, and then he can walk again.

Your task is to help John calculate the maximum amount of bonuses he can get.

# Input

- `gameMap/gamemap`: A `n` x `m` integer array. Each element represents the number on the card.
  - `4 <= n,m <= 40(Pyhon)/100(JS)`


- All inputs are valid.

# Output

An integer. the maximum amount of bonuses John can get.

# Eaxmple

For 
```
gameMap=
[
[1, 3, 9],
[2, 8, 5],
[5, 7, 4]
]
```
The output should be `39`.

One of the possible solution is:
```
1st game:
[
[>, >, v],
[2, 8, v],
[5, 7, v]
]
1+3+9+5+4=22

2nd game:
[
[v, 0, 0],
[>, v, 0],
[5, >, >]
]
0+2+8+7+0=17

Final bonus = 22 + 17 = 39
```

Answer: {"fn_name": "calc", "inputs": [[[[1, 3, 9], [2, 8, 5], [5, 7, 4]]], [[[11, 72, 38], [80, 69, 65], [68, 96, 99]]], [[[1, 5, 1, 1], [1, 5, 5, 1], [5, 5, 5, 1], [1, 1, 5, 1]]], [[[0, 0, 2, 3, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 4, 0, 0], [0, 0, 2, 0, 4, 0, 0], [0, 0, 0, 0, 0, 0, 0]]]], "outputs": [[39], [560], [40], [25]]}
user: Let's say take 2 strings, A and B, and define the similarity of the strings to be the length of the longest prefix common to both strings. For example, the similarity of strings `abc` and `abd` is 2, while the similarity of strings `aaa` and `aaab` is 3.

write a function that calculates the sum of similarities of a string S with each of it's **suffixes**.

```python
string_suffix('ababaa') => returns 11
string_suffix('abc') => returns 3
```

Explanation:

In the first case, the suffixes of the string are `ababaa`, `babaa`, `abaa`, `baa`, `aa` and `a`. The similarities of each of these strings with the string `ababaa` are 6,0,3,0,1,1 respectively. Thus the answer is 6 + 0 + 3 + 0 + 1 + 1 = 11.

For the second case, the answer is simply 3 + 0 + 0 = 3.

Note : Each string will have at least one character - no need to check for empty strings :)

Answer: {"fn_name": "string_suffix", "inputs": [["aa"], ["abc"], ["ababaa"], ["aaaa"], ["aaaaa"], ["aaaaaa"], ["mnsomn"], ["apple"], ["a"], ["pippi"]], "outputs": [[3], [3], [11], [10], [15], [21], [8], [5], [1], [8]]}
user: Your team is writing a fancy new text editor and you've been tasked with implementing the line numbering.

Write a function which takes a list of strings and returns each line prepended by the correct number.

The numbering starts at 1. The format is `n: string`. Notice the colon and space in between.

**Examples:**

```python
number([]) # => []
number(["a", "b", "c"]) # => ["1: a", "2: b", "3: c"]
```

Answer: {"fn_name": "number", "inputs": [[[]], [["a", "b", "c"]], [["", "", "", "", ""]], [["", "b", "", "", ""]]], "outputs": [[[]], [["1: a", "2: b", "3: c"]], [["1: ", "2: ", "3: ", "4: ", "5: "]], [["1: ", "2: b", "3: ", "4: ", "5: "]]]}
user: # Explanation

It's your first day in the robot factory and your supervisor thinks that you should start with an easy task. So you are responsible for purchasing raw materials needed to produce the robots.

A complete robot weights `50` kilogram. Iron is the only material needed to create a robot. All iron is inserted in the first machine; the output of this machine is the input for the next one, and so on. The whole process is sequential. Unfortunately not all machines are first class, so a given percentage of their inputs are destroyed during processing.

# Task

You need to figure out how many kilograms of iron you need to buy to build the requested number of robots.

# Example

Three machines are used to create a robot. Each of them produces `10%` scrap. Your target is to deliver `90` robots.  
The method will be called with the following parameters:

```
CalculateScrap(scrapOfTheUsedMachines, numberOfRobotsToProduce)
CalculateScrap(int[] { 10, 10, 10 }, 90)
```

# Assumptions

* The scrap is less than `100%`.
* The scrap is never negative.
* There is at least one machine in the manufacturing line.
* Except for scrap there is no material lost during manufacturing.
* The number of produced robots is always a positive number.
* You can only buy full kilograms of iron.

Answer: {"fn_name": "calculate_scrap", "inputs": [[[10], 90], [[20, 10], 55], [[0], 90], [[0, 0, 0], 90], [[10, 0], 90], [[0, 10], 90], [[10, 0, 0, 10], 81], [[0, 10, 0, 10], 81], [[0, 10, 10, 0], 81], [[10, 20, 30, 40, 50, 60, 70, 80, 90], 25], [[90, 80, 70, 60, 50, 40, 30, 20, 10], 20], [[10, 0, 30, 0, 50, 0, 70, 0, 90], 25], [[22, 33, 44, 10, 0, 0, 0, 88, 12], 33], [[22, 33, 44, 10, 0, 0, 0, 88, 12, 10, 0, 30, 0, 50, 0, 70, 0, 90], 13], [[47, 69, 28, 20, 41, 71, 84, 56, 62, 3, 74, 35, 25, 4, 57, 73, 64, 35, 78, 51], 8], [[38, 38, 73, 9, 3, 47, 86, 67, 75, 52, 46, 86, 30, 37, 80, 48, 52, 0, 85, 72], 11], [[71, 82, 47, 72, 5, 75, 69, 30, 16, 43, 10, 11, 64, 53, 12, 78, 23, 7, 24, 85], 12], [[81, 31, 24, 55, 42, 10, 68, 28, 12, 38, 60, 62, 66, 96, 51, 54, 89, 1, 4, 27], 9]], "outputs": [[5000], [3820], [4500], [4500], [5000], [5000], [5000], [5000], [5000], [3444665], [2755732], [132276], [59323], [2472964], [2671381450], [29229344539], [1465387910], [4301282783]]}
user: ```if-not:rust
Your task is to write a function `toLeetSpeak` that converts a regular english sentence to Leetspeak.
```
```if:rust
Your task is to write a function `to_leet_speak` that converts a regular english sentence to Leetspeak.
```

More about LeetSpeak You can read at wiki -> https://en.wikipedia.org/wiki/Leet

Consider only uppercase letters (no lowercase letters, no numbers) and spaces.

For example:

```if-not:rust
~~~
toLeetSpeak("LEET") returns "1337"
~~~
```
```if:rust
~~~
to_leet_speak("LEET") returns "1337"
~~~
```

In this kata we use a simple LeetSpeak dialect. Use this alphabet:

```
{
  A : '@',
  B : '8',
  C : '(',
  D : 'D',
  E : '3',
  F : 'F',
  G : '6',
  H : '#',
  I : '!',
  J : 'J',
  K : 'K',
  L : '1',
  M : 'M',
  N : 'N',
  O : '0',
  P : 'P',
  Q : 'Q',
  R : 'R',
  S : '$',
  T : '7',
  U : 'U',
  V : 'V',
  W : 'W',
  X : 'X',
  Y : 'Y',
  Z : '2'
}
```

Answer: {"fn_name": "to_leet_speak", "inputs": [["LEET"], ["CODEWARS"], ["HELLO WORLD"], ["LOREM IPSUM DOLOR SIT AMET"], ["THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"]], "outputs": [["1337"], ["(0D3W@R$"], ["#3110 W0R1D"], ["10R3M !P$UM D010R $!7 @M37"], ["7#3 QU!(K 8R0WN F0X JUMP$ 0V3R 7#3 1@2Y D06"]]}
user: Task:
Make a function that converts a word to pig latin. The rules of pig latin are:

```
If the word has more than 3 letters:
  1. Take the first letter of a word and move it to the end
  2. Add -ay to the word
Otherwise leave the word alone.
```

Example: `hello` = `ellohay`

Answer: {"fn_name": "pig_latin", "inputs": [["hello"], ["hi"]], "outputs": [["ellohay"], ["hi"]]}
user: You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1.

As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that number, but excluding zero.

For example:
```python
monkeyCount(10) # --> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
monkeyCount(1) # --> [1]
```

Answer: {"fn_name": "monkey_count", "inputs": [[5], [3], [9], [10], [20]], "outputs": [[[1, 2, 3, 4, 5]], [[1, 2, 3]], [[1, 2, 3, 4, 5, 6, 7, 8, 9]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]]}
user: You wrote all your unit test names in camelCase.
But some of your colleagues have troubles reading these long test names.
So you make a compromise to switch to underscore separation.

To make these changes fast you wrote a class to translate a camelCase name
into an underscore separated name.

Implement the ToUnderscore() method.

Example:

`"ThisIsAUnitTest" => "This_Is_A_Unit_Test"`


**But of course there are always special cases...**

You also have some calculation tests. Make sure the results don't get split by underscores.
So only add an underscore in front of the first number.

Also Some people already used underscore names in their tests. You don't want to change them.
But if they are not split correct you should adjust them.

Some of your colleagues mark their tests with a leading and trailing underscore.
Don't remove this.

And of course you should handle empty strings to avoid unnecessary errors. Just return an empty string then.

Example:

`"Calculate15Plus5Equals20" => "Calculate_15_Plus_5_Equals_20"`

`"This_Is_Already_Split_Correct" => "This_Is_Already_Split_Correct"`

`"ThisIs_Not_SplitCorrect" => "This_Is_Not_Split_Correct"`

`"_UnderscoreMarked_Test_Name_" => _Underscore_Marked_Test_Name_"`

Answer: {"fn_name": "toUnderScore", "inputs": [["ThisIsAUnitTest"], ["ThisShouldBeSplittedCorrectIntoUnderscore"], ["Calculate1Plus1Equals2"], ["Calculate15Plus5Equals20"], ["Calculate500DividedBy5Equals100"], ["Adding_3To_3ShouldBe_6"], ["This_Is_Already_Splitted_Correct"], ["ThisIs_Not_SplittedCorrect"], ["_IfATestStartAndEndsWithUnderscore_ItShouldBeTheSame_"], [""]], "outputs": [["This_Is_A_Unit_Test"], ["This_Should_Be_Splitted_Correct_Into_Underscore"], ["Calculate_1_Plus_1_Equals_2"], ["Calculate_15_Plus_5_Equals_20"], ["Calculate_500_Divided_By_5_Equals_100"], ["Adding_3_To_3_Should_Be_6"], ["This_Is_Already_Splitted_Correct"], ["This_Is_Not_Splitted_Correct"], ["_If_A_Test_Start_And_Ends_With_Underscore_It_Should_Be_The_Same_"], [""]]}
user: You will be given the prime factors of a number as an array.
E.g: ```[2,2,2,3,3,5,5,13]```

You need to find the number, n, to which that prime factorization belongs.
It will be:
```
n = 2³.3².5².13 = 23400
```
Then, generate the divisors of this number.

Your function ```get_num() or getNum()``` will receive an array with potentially unordered prime factors and should output: an array with the found integer n at index 0, the amount of total divisors (both prime and compound numbers) at index 1, followed the smallest factor (index 2, and the biggest one (last element)

We will see the example given above with the only difference that the array of the prime factors is unordered.

The list of divisors for that number (23400) is:
```
2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 15, 18, 20, 24, 25, 26, 30, 36, 39, 40, 45, 50, 52, 60, 65, 72, 75, 78, 90, 100, 104, 117, 120, 130, 150, 156, 180, 195, 200, 225, 234, 260, 300, 312, 325, 360, 390, 450, 468, 520, 585, 600, 650, 780, 900, 936, 975, 1170, 1300, 1560, 1800, 1950, 2340, 2600, 2925, 3900, 4680, 5850, 7800, 11700 (not considering the integer 23400 itself)
```
There is a total amount of ```71``` divisors. The smallest divisor is ```2``` and the highest ```11700```.
So the expected output will be: 
```
get_num([2,13,2,5,2,5,3,3]) == [23400, 71, 2, 11700]
```
Enjoy!

Answer: {"fn_name": "get_num", "inputs": [[[2, 3, 5, 5]], [[2, 3, 3, 3, 7]], [[3, 3, 3, 11]], [[2, 13, 2, 5, 2, 5, 3, 3]]], "outputs": [[[150, 11, 2, 75]], [[378, 15, 2, 189]], [[297, 7, 3, 99]], [[23400, 71, 2, 11700]]]}
user: I'm sure you're familiar with factorials – that is, the product of an integer and all the integers below it. 

For example, `5! = 120`, as `5 * 4 * 3 * 2 * 1 = 120`

Your challenge is to create a function that takes any number and returns the number that it is a factorial of. So, if your function receives `120`, it should return `"5!"` (as a string).

Of course, not every number is a factorial of another. In this case, your function would return `"None"` (as a string).

### Examples

* `120` will return `"5!"`
* `24` will return `"4!"`
* `150` will return `"None"`

Answer: {"fn_name": "reverse_factorial", "inputs": [[120], [3628800], [150]], "outputs": [["5!"], ["10!"], ["None"]]}
user: **This Kata is intended as a small challenge for my students**

All Star Code Challenge #23

There is a certain multiplayer game where players are assessed at the end of the game for merit. Players are ranked according to an internal scoring system that players don't see.

You've discovered the formula for the scoring system!

Create a function called `scoring()` that takes an array of Player objects and returns an array of player names, in order of descending score (highest score is index 0, 2nd highest is index 1, etc.).

Each player's score is calculated as follows:

1. Each normal kill is worth 100 points
2. Each assist is worth 50 points
3. Each point of damage done is worth .5 points
4. Each point of healing done is worth 1 point
5. The longest kill streak is worth 2^N, where N is the number of kills of the streak
6. Environmental kills are worth 500 points (These are counted separately from normal kills)

For each of the above statistic, a Player object contains a respective "key:value" pairing. All values except the 'name' are integers.

Note:  
Assume the input array will ALWAYS have a properly constructed Player object (no missing keys or values)  
Names will not contain unusual characters nor repeat (names are unique)  
Players with the same score should be sorted by the order they appear in the array  
For simplicity, for a kill streak of 0 the kill streak calculation will yield 1 (or 2^(0)) points

Answer: {"fn_name": "scoring", "inputs": [[[]]], "outputs": [[[]]]}
user: Given that 
```
f0 = '0'
f1 = '01'
f2 = '010' = f1 + f0
f3 = '01001' = f2 + f1
```

You will be given a number and your task is to return the `nth` fibonacci string. For example:

```
solve(2) = '010'
solve(3) = '01001'
```

More examples in test cases. Good luck!

If you like sequence Katas, you will enjoy this Kata: [Simple Prime Streaming](https://www.codewars.com/kata/5a908da30025e995880000e3)

Answer: {"fn_name": "solve", "inputs": [[0], [1], [2], [3], [5]], "outputs": [["0"], ["01"], ["010"], ["01001"], ["0100101001001"]]}
user: # Leaderboard climbers

In this kata you will be given a leaderboard of unique names for example:

```python
['John',
 'Brian',
 'Jim',
 'Dave',
 'Fred']
```

Then you will be given a list of strings for example:

```python
['Dave +1', 'Fred +4', 'Brian -1']
```

Then you sort the leaderboard.

The steps for our example would be:

```python
# Dave up 1
['John',
 'Brian',
 'Dave',
 'Jim',
 'Fred']
```

```python
# Fred up 4
['Fred',
 'John',
 'Brian',
 'Dave',
 'Jim']
```

```python
# Brian down 1
['Fred',
 'John',
 'Dave',
 'Brian',
 'Jim']
```

Then once you have done this you need to return the leaderboard.

All inputs will be valid. All strings in the second list will never ask to move a name up higher or lower than possible eg. `"John +3"` could not be added to the end of the second input list in the example above.

The strings in the second list will always be something in the leaderboard followed by a space and a `+` or `-` sign followed by a number.

Answer: {"fn_name": "leaderboard_sort", "inputs": [[["John", "Brian", "Jim", "Dave", "Fred"], ["Dave +1", "Fred +4", "Brian -1"]], [["Bob", "Larry", "Kevin", "Jack", "Max"], ["Max +3", "Kevin -1", "Kevin +3"]]], "outputs": [[["Fred", "John", "Dave", "Brian", "Jim"]], [["Bob", "Kevin", "Max", "Larry", "Jack"]]]}
user: Complete the function that determines the score of a hand in the card game [Blackjack](https://en.wikipedia.org/wiki/Blackjack) (aka 21).

The function receives an array of strings that represent each card in the hand (`"2"`, `"3",` ..., `"10"`, `"J"`, `"Q"`, `"K"` or `"A"`) and should return the score of the hand (integer).

~~~if:c
Note: in C the function receives a character array with the card `10` represented by the character `T`.
~~~


### Scoring rules:

Number cards count as their face value (2 through 10). Jack, Queen and King count as 10. An Ace can be counted as either 1 or 11.

Return the highest score of the cards that is less than or equal to 21. If there is no score less than or equal to 21 return the smallest score more than 21.


## Examples

```
["A"]                           ==>  11
["A", "J"]                      ==>  21
["A", "10", "A"]                ==>  12
["5", "3", "7"]                 ==>  15
["5", "4", "3", "2", "A", "K"]  ==>  25
```

Answer: {"fn_name": "score_hand", "inputs": [[["2", "3"]], [["4", "5", "6"]], [["7", "7", "8"]], [["9", "2", "10"]], [["4", "7", "8"]], [["J", "3"]], [["J", "Q"]], [["K", "J", "Q"]], [["A", "3"]], [["A", "J"]], [["A", "A", "A", "J"]], [["A", "2", "A", "9", "9"]], [["A", "A"]], [["8", "A", "A"]], [["5", "4", "A", "A"]], [["A", "2", "A", "3", "A"]], [["A", "A", "A", "A"]]], "outputs": [[5], [15], [22], [21], [19], [13], [20], [30], [14], [21], [13], [22], [12], [20], [21], [18], [14]]}
user: # Task
 `N` candles are placed in a row, some of them are initially lit. For each candle from the 1st to the Nth the following algorithm is applied: if the observed candle is lit then states of this candle and all candles before it are changed to the opposite. Which candles will remain lit after applying the algorithm to all candles in the order they are placed in the line?

# Example

 For `a = [1, 1, 1, 1, 1]`, the output should be `[0, 1, 0, 1, 0].`

 Check out the image below for better understanding:
 
 

 ![](https://codefightsuserpics.s3.amazonaws.com/tasks/switchLights/img/example.png?_tm=1484040239470)
 
 
 
 For `a = [0, 0]`, the output should be `[0, 0].`

 The candles are not initially lit, so their states are not altered by the algorithm.

# Input/Output

 - `[input]` integer array `a`

     Initial situation - array of zeros and ones of length N, 1 means that the corresponding candle is lit.

    Constraints: `2 ≤ a.length ≤ 5000.`

 - `[output]` an integer array

    Situation after applying the algorithm - array in the same format as input with the same length.

Answer: {"fn_name": "switch_lights", "inputs": [[[1, 1, 1, 1, 1]], [[0, 0]], [[1, 0, 0, 1, 0, 1, 0, 1]], [[1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1]]], "outputs": [[[0, 1, 0, 1, 0]], [[0, 0]], [[1, 1, 1, 0, 0, 1, 1, 0]], [[1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0]]]}
user: # Background

My pet bridge-maker ants are marching across a terrain from left to right.

If they encounter a gap, the first one stops and then next one climbs over him, then the next, and the next, until a bridge is formed across the gap. 

What clever little things they are!

Now all the other ants can walk over the ant-bridge.

When the last ant is across, the ant-bridge dismantles itself similar to how it was constructed.

This process repeats as many times as necessary (there may be more than one gap to cross) until all the ants reach the right hand side.

# Kata Task

My little ants are marching across the terrain from left-to-right in the order ```A``` then ```B``` then ```C```...

What order do they exit on the right hand side?

# Notes

* ```-``` = solid ground
* ```.``` = a gap
* The number of ants may differ but there are always enough ants to bridge the gaps
* The terrain never starts or ends with a gap
* Ants cannot pass other ants except by going over ant-bridges
* If there is ever ambiguity which ant should move, then the ant at the **back** moves first

# Example

## Input
* ants = ````GFEDCBA````
* terrain = ```------------...-----------```

## Output
* result = ```EDCBAGF```

## Details


Ants moving left to right.
GFEDCBA
------------...-----------

The first one arrives at a gap.
GFEDCB     A
------------...-----------

They start to bridge over the gap...
GFED       ABC
------------...-----------

...until the ant-bridge is completed!
GF         ABCDE
------------...-----------

And then the remaining ants can walk across the bridge.
               F
G          ABCDE
------------...-----------

And when no more ants need to cross...
           ABCDE        GF
------------...-----------

... the bridge dismantles itself one ant at a time....                
             CDE      BAGF
------------...-----------

...until all ants get to the other side                
                   EDCBAGF
------------...-----------

Answer: {"fn_name": "ant_bridge", "inputs": [["GFEDCBA", "-----------------------"], ["GFEDCBA", "------------...-----------"], ["GFEDCBA", "------------.....---------"], ["GFEDCBA", "------.....------.....---------"], ["GFEDCBA", "------------...-----..----"], ["CBA", "--.--.---"], ["GFEDCBA", "------....-.---"], ["EDCBA", "--..---...-..-...----..-----"], ["JIHGFEDCBA", "--........------.-........-........---....-----"], ["JIHGFEDCBA", "-.....------........-.......-.......----"], ["JIHGFEDCBA", "-------.......-.......-"], ["JIHGFEDCBA", "-------.......-.......-.......-"], ["GFEDCBA", "-.-.-.-"]], "outputs": [["GFEDCBA"], ["EDCBAGF"], ["GFEDCBA"], ["GFEDCBA"], ["BAGFEDC"], ["CBA"], ["AGFEDCB"], ["EDCBA"], ["GFEDCBAJIH"], ["CBAJIHGFED"], ["GFEDCBAJIH"], ["EDCBAJIHGF"], ["GFEDCBA"]]}
user: Consider the sequence `a(1) = 7, a(n) = a(n-1) + gcd(n, a(n-1)) for n >= 2`: 

`7, 8, 9, 10, 15, 18, 19, 20, 21, 22, 33, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 69, 72, 73...`.

Let us take the differences between successive elements of the sequence and
get a second sequence `g: 1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1...`.

For the sake of uniformity of the lengths of sequences **we add** a `1` at the head of g:

`g: 1, 1, 1, 1, 5, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 3, 1...`

Removing the 1s gives a third sequence:
`p: 5, 3, 11, 3, 23, 3...`
where you can see prime numbers.

#Task:
Write functions:
```
1: an(n) with parameter n: returns the first n terms of the series a(n) (not tested)

2: gn(n) with parameter n: returns the first n terms of the series g(n) (not tested)

3: countOnes(n) with parameter n: returns the number of 1 in g(n) 
    (don't forget to add a `1` at the head) # (tested)
    
4: p(n) with parameter n: returns an array of n unique prime numbers (not tested)

5: maxp(n) with parameter n: returns the biggest prime number of the sequence pn(n) # (tested)

6: anOver(n) with parameter n: returns an array (n terms) of the a(i)/i for every i such g(i) != 1 (not tested but interesting result)

7: anOverAverage(n) with parameter n: returns as an *integer* the average of anOver(n)  (tested)
```

#Note:
You can write directly functions `3:`, `5:` and `7:`. There is no need to write functions `1:`, `2:`, `4:` `6:`
except out of pure curiosity.

Answer: {"fn_name": "count_ones", "inputs": [[1], [10], [100], [200], [1000], [10000], [100000]], "outputs": [[1], [8], [90], [184], [975], [9968], [99955]]}
user: An element in an array is dominant if it is greater than all elements to its right. You will be given an array and your task will be to return a list of all dominant elements. For example:
```Haskell
solve([1,21,4,7,5]) = [21,7,5] because 21, 7 and 5 are greater than elments to their right. 
solve([5,4,3,2,1]) = [5,4,3,2,1]

Notice that the last element is always included.
```

More examples in the test cases.

Good luck!

Answer: {"fn_name": "solve", "inputs": [[[16, 17, 14, 3, 14, 5, 2]], [[92, 52, 93, 31, 89, 87, 77, 105]], [[75, 47, 42, 56, 13, 55]], [[67, 54, 27, 85, 66, 88, 31, 24, 49]], [[76, 17, 25, 36, 29]], [[104, 18, 37, 9, 36, 47, 28]]], "outputs": [[[17, 14, 5, 2]], [[105]], [[75, 56, 55]], [[88, 49]], [[76, 36, 29]], [[104, 47, 28]]]}