name stringclasses 161
values | language stringclasses 22
values | prompt stringlengths 40 2.27k | doctests stringclasses 3
values | original stringclasses 956
values | prompt_terminology stringclasses 2
values | tests stringlengths 125 5.35k | stop_tokens listlengths 1 7 |
|---|---|---|---|---|---|---|---|
HumanEval_144_simplify | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Your task is to implement a function that will simplify the expression
// x * n. The function returns true if x * n evalua... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Simplify(("1/5"), ("5/1")) == (true));
Debug.Assert(Simplify(("1/6"), ("2/1")) == (false));
Debug.Assert(Simplify(("5/1"), ("3/1")) == (true));
Debug.Assert(Simplify(("7/10"), ("10/2")) == (false));
Debug.Assert(Simplify(("2/10"), ("50/... | [
"\n }\n"
] |
HumanEval_145_order_by_points | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function which sorts the given list of integers
// in ascending order according to the sum of their digits.
//... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(OrderByPoints((new List<long>(new long[]{(long)1L, (long)11L, (long)-1L, (long)-11L, (long)-12L}))).Equals((new List<long>(new long[]{(long)-1L, (long)-11L, (long)1L, (long)-12L, (long)11L}))));
Debug.Assert(OrderByPoints((new List<long>(new long[]... | [
"\n }\n"
] |
HumanEval_146_specialFilter | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that takes a list of numbers as input and returns
// the number of elements in the list that are greater... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Specialfilter((new List<long>(new long[]{(long)5L, (long)-2L, (long)1L, (long)-5L}))) == (0L));
Debug.Assert(Specialfilter((new List<long>(new long[]{(long)15L, (long)-73L, (long)14L, (long)-15L}))) == (1L));
Debug.Assert(Specialfilter((new Lis... | [
"\n }\n"
] |
HumanEval_147_get_max_triples | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given a positive integer n. You have to create an integer list a of length n.
// For each i (1 ≤ i ≤ n), the value... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(GetMaxTriples((5L)) == (1L));
Debug.Assert(GetMaxTriples((6L)) == (4L));
Debug.Assert(GetMaxTriples((10L)) == (36L));
Debug.Assert(GetMaxTriples((100L)) == (53361L));
}
}
| [
"\n }\n"
] |
HumanEval_148_bf | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// There are eight planets in our solar system: the closerst to the Sun
// is Mercury, the next one is Venus, then Earth, Ma... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Bf(("Jupiter"), ("Neptune")).Equals((new List<string>(new string[]{(string)"Saturn", (string)"Uranus"}))));
Debug.Assert(Bf(("Earth"), ("Mercury")).Equals((new List<string>(new string[]{(string)"Venus"}))));
Debug.Assert(Bf(("Mercury"), ("Uranu... | [
"\n }\n"
] |
HumanEval_149_sorted_list_sum | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that accepts a list of strings as a parameter,
// deletes the strings that have odd lengths from it,
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SortedListSum((new List<string>(new string[]{(string)"aa", (string)"a", (string)"aaa"}))).Equals((new List<string>(new string[]{(string)"aa"}))));
Debug.Assert(SortedListSum((new List<string>(new string[]{(string)"school", (string)"AI", (string)"as... | [
"\n }\n"
] |
HumanEval_14_all_prefixes | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return list of all prefixes from shortest to longest of the input string
// >>> AllPrefixes(("abc"))
// (new List<stri... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(AllPrefixes(("")).Equals((new List<string>())));
Debug.Assert(AllPrefixes(("asdfgh")).Equals((new List<string>(new string[]{(string)"a", (string)"as", (string)"asd", (string)"asdf", (string)"asdfg", (string)"asdfgh"}))));
Debug.Assert(AllPrefix... | [
"\n }\n"
] |
HumanEval_150_x_or_y | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// A simple program which should return the value of x if n is
// a prime number and should return the value of y otherwise.... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(XOrY((7L), (34L), (12L)) == (34L));
Debug.Assert(XOrY((15L), (8L), (5L)) == (5L));
Debug.Assert(XOrY((3L), (33L), (5212L)) == (33L));
Debug.Assert(XOrY((1259L), (3L), (52L)) == (3L));
Debug.Assert(XOrY((7919L), (-1L), (12L)) == (-1L));
... | [
"\n }\n"
] |
HumanEval_151_double_the_difference | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a list of numbers, return the sum of squares of the numbers
// in the list that are odd. Ignore numbers that are neg... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(DoubleTheDifference((new List<float>())) == (0L));
Debug.Assert(DoubleTheDifference((new List<float>(new float[]{(float)5.0f, (float)4.0f}))) == (25L));
Debug.Assert(DoubleTheDifference((new List<float>(new float[]{(float)0.1f, (float)0.2f, (fl... | [
"\n }\n"
] |
HumanEval_152_compare | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// I think we all remember that feeling when the result of some long-awaited
// event is finally known. The feelings and thou... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Compare((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L, (long)1L})), (new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)2L, (long)-2L}))).Equals((new List<long>(new long[]{(long)0L, (long)0L, (long)0L,... | [
"\n }\n"
] |
HumanEval_153_Strongest_Extension | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You will be given the name of a class (a string) and a list of extensions.
// The extensions are to be used to load additi... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(StrongestExtension(("Watashi"), (new List<string>(new string[]{(string)"tEN", (string)"niNE", (string)"eIGHt8OKe"}))).Equals(("Watashi.eIGHt8OKe")));
Debug.Assert(StrongestExtension(("Boku123"), (new List<string>(new string[]{(string)"nani", (strin... | [
"\n }\n"
] |
HumanEval_154_cycpattern_check | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given 2 words. You need to return true if the second word or any of its rotations is a substring in the first word
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CycpatternCheck(("xyzw"), ("xyw")) == (false));
Debug.Assert(CycpatternCheck(("yello"), ("ell")) == (true));
Debug.Assert(CycpatternCheck(("whattup"), ("ptut")) == (false));
Debug.Assert(CycpatternCheck(("efef"), ("fee")) == (true));
De... | [
"\n }\n"
] |
HumanEval_155_even_odd_count | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given an integer. return a tuple that has the number of even and odd digits respectively.
// Example:
// >>> EvenOddCo... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(EvenOddCount((7L)).Equals((Tuple.Create(0L, 1L))));
Debug.Assert(EvenOddCount((-78L)).Equals((Tuple.Create(1L, 1L))));
Debug.Assert(EvenOddCount((3452L)).Equals((Tuple.Create(2L, 2L))));
Debug.Assert(EvenOddCount((346211L)).Equals((Tuple.Cr... | [
"\n }\n"
] |
HumanEval_156_int_to_mini_roman | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a positive integer, obtain its roman numeral equivalent as a string,
// and return it in lowercase.
// Restricti... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IntToMiniRoman((19L)).Equals(("xix")));
Debug.Assert(IntToMiniRoman((152L)).Equals(("clii")));
Debug.Assert(IntToMiniRoman((251L)).Equals(("ccli")));
Debug.Assert(IntToMiniRoman((426L)).Equals(("cdxxvi")));
Debug.Assert(IntToMiniRoman((... | [
"\n }\n"
] |
HumanEval_157_right_angle_triangle | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given the lengths of the three sides of a triangle. Return true if the three
// sides form a right-angled triangle, false ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(RightAngleTriangle((3L), (4L), (5L)) == (true));
Debug.Assert(RightAngleTriangle((1L), (2L), (3L)) == (false));
Debug.Assert(RightAngleTriangle((10L), (6L), (8L)) == (true));
Debug.Assert(RightAngleTriangle((2L), (2L), (2L)) == (false));
... | [
"\n }\n"
] |
HumanEval_158_find_max | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that accepts a list of strings.
// The list contains different words. Return the word with maximum number... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_158_find_max.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FindMax((new List<string>(new string[]{(string)"name", (string)"of", (string)"string"}))).Equals(("string")));
Debug.Assert(FindMax((new List<string>(new string[]{(string)"name", (string)"enam", (string)"game"}))).Equals(("enam")));
Debug.Asser... | [
"\n }\n"
] |
HumanEval_159_eat | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You're a hungry rabbit, and you already have eaten a certain number of carrots,
// but now you need to eat more carrots to... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Eat((5L), (6L), (10L)).Equals((new List<long>(new long[]{(long)11L, (long)4L}))));
Debug.Assert(Eat((4L), (8L), (9L)).Equals((new List<long>(new long[]{(long)12L, (long)1L}))));
Debug.Assert(Eat((1L), (10L), (10L)).Equals((new List<long>(new lo... | [
"\n }\n"
] |
HumanEval_15_string_sequence | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return a string containing space-delimited numbers starting from 0 upto n inclusive.
// >>> StringSequence((0L))
// ("... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(StringSequence((0L)).Equals(("0")));
Debug.Assert(StringSequence((3L)).Equals(("0 1 2 3")));
Debug.Assert(StringSequence((10L)).Equals(("0 1 2 3 4 5 6 7 8 9 10")));
}
}
| [
"\n }\n"
] |
HumanEval_160_do_algebra | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given two lists operator, and operand. The first list has basic algebra operations, and
// the second list is a list of i... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_160_do_algebra.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(DoAlgebra((new List<string>(new string[]{(string)"**", (string)"*", (string)"+"})), (new List<long>(new long[]{(long)2L, (long)3L, (long)4L, (long)5L}))) == (37L));
Debug.Assert(DoAlgebra((new List<string>(new string[]{(string)"+", (string)"*", (st... | [
"\n }\n"
] |
HumanEval_161_solve | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given a string s.
// if s[i] is a letter, reverse its case from lower to upper or vise versa,
// otherwise ke... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Solve(("AsDf")).Equals(("aSdF")));
Debug.Assert(Solve(("1234")).Equals(("4321")));
Debug.Assert(Solve(("ab")).Equals(("AB")));
Debug.Assert(Solve(("#a@C")).Equals(("#A@c")));
Debug.Assert(Solve(("#AsdfW^45")).Equals(("#aSDFw^45")));
... | [
"\n }\n"
] |
HumanEval_162_string_to_md5 | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a string 'text', return its md5 hash equivalent string.
// If 'text' is an empty string, return null.
// >>> Str... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_162_string_to_md5.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(StringToMd5(("Hello world")).Equals(("3e25960a79dbc69b674cd4ec67a72c62")));
Debug.Assert(StringToMd5(("")).Equals(null));
Debug.Assert(StringToMd5(("A B C")).Equals(("0ef78513b0cb8cef12743f5aeb35f888")));
Debug.Assert(StringToMd5(("password... | [
"\n }\n"
] |
HumanEval_163_generate_integers | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given two positive integers a and b, return the even digits between a
// and b, in ascending order.
// For example:
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(GenerateIntegers((2L), (10L)).Equals((new List<long>(new long[]{(long)2L, (long)4L, (long)6L, (long)8L}))));
Debug.Assert(GenerateIntegers((10L), (2L)).Equals((new List<long>(new long[]{(long)2L, (long)4L, (long)6L, (long)8L}))));
Debug.Assert(... | [
"\n }\n"
] |
HumanEval_16_count_distinct_characters | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a string, find out how many distinct characters (regardless of case) does it consist of
// >>> CountDistinctCharacte... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CountDistinctCharacters(("")) == (0L));
Debug.Assert(CountDistinctCharacters(("abcde")) == (5L));
Debug.Assert(CountDistinctCharacters(("abcdecadeCADE")) == (5L));
Debug.Assert(CountDistinctCharacters(("aaaaAAAAaaaa")) == (1L));
Debug.A... | [
"\n }\n"
] |
HumanEval_17_parse_music | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Input to this function is a string representing musical notes in a special ASCII format.
// Your task is to parse this str... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(ParseMusic(("")).Equals((new List<long>())));
Debug.Assert(ParseMusic(("o o o o")).Equals((new List<long>(new long[]{(long)4L, (long)4L, (long)4L, (long)4L}))));
Debug.Assert(ParseMusic((".| .| .| .|")).Equals((new List<long>(new long[]{(long)1... | [
"\n }\n"
] |
HumanEval_18_how_many_times | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Find how many times a given substring can be found in the original string. Count overlaping cases.
// >>> HowManyTimes((""... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(HowManyTimes((""), ("x")) == (0L));
Debug.Assert(HowManyTimes(("xyxyxyx"), ("x")) == (4L));
Debug.Assert(HowManyTimes(("cacacacac"), ("cac")) == (4L));
Debug.Assert(HowManyTimes(("john doe"), ("john")) == (1L));
}
}
| [
"\n }\n"
] |
HumanEval_19_sort_numbers | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Input is a space-delimited string of numberals from 'zero' to 'nine'.
// Valid choices are 'zero', 'one', 'two', 'three', ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SortNumbers(("")).Equals(("")));
Debug.Assert(SortNumbers(("three")).Equals(("three")));
Debug.Assert(SortNumbers(("three five nine")).Equals(("three five nine")));
Debug.Assert(SortNumbers(("five zero four seven nine eight")).Equals(("zero... | [
"\n }\n"
] |
HumanEval_1_separate_paren_groups | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Input to this function is a string containing multiple groups of nested parentheses. Your goal is to
// separate those gro... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SeparateParenGroups(("(()()) ((())) () ((())()())")).Equals((new List<string>(new string[]{(string)"(()())", (string)"((()))", (string)"()", (string)"((())()())"}))));
Debug.Assert(SeparateParenGroups(("() (()) ((())) (((())))")).Equals((new List<s... | [
"\n }\n"
] |
HumanEval_20_find_closest_elements | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// From a supplied list of numbers (of length at least two) select and return two that are the closest to each
// other and r... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FindClosestElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (float)4.0f, (float)5.0f, (float)2.2f}))).Equals((Tuple.Create(3.9f, 4.0f))));
Debug.Assert(FindClosestElements((new List<float>(new float[]{(float)1.0f, (float... | [
"\n }\n"
] |
HumanEval_21_rescale_to_unit | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given list of numbers (of at least two elements), apply a linear transform to that list,
// such that the smallest number ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(RescaleToUnit((new List<float>(new float[]{(float)2.0f, (float)49.9f}))).Equals((new List<float>(new float[]{(float)0.0f, (float)1.0f}))));
Debug.Assert(RescaleToUnit((new List<float>(new float[]{(float)100.0f, (float)49.9f}))).Equals((new List<flo... | [
"\n }\n"
] |
HumanEval_22_filter_integers | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Filter given list of any csthon values only for integers
// >>> FilterIntegers((new List<object>(new string[]{(string)"a",... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FilterIntegers((new List<object>())).Equals((new List<long>())));
Debug.Assert(FilterIntegers((new List<object>(new object[]{4L, new List<object>(), 23.2f, 9L, "adasd"}))).Equals((new List<long>(new long[]{(long)4L, (long)9L}))));
Debug.Assert(... | [
"\n }\n"
] |
HumanEval_23_strlen | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return length of given string
// >>> StringLength((""))
// (0L)
// >>> StringLength(("abc"))
// (3L)
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Strlen(("")) == (0L));
Debug.Assert(Strlen(("x")) == (1L));
Debug.Assert(Strlen(("asdasnakj")) == (9L));
}
}
| [
"\n }\n"
] |
HumanEval_24_largest_divisor | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// For a given number n, find the largest number that divides n evenly, smaller than n
// >>> LargestDivisor((15L))
// (5... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(LargestDivisor((3L)) == (1L));
Debug.Assert(LargestDivisor((7L)) == (1L));
Debug.Assert(LargestDivisor((10L)) == (5L));
Debug.Assert(LargestDivisor((100L)) == (50L));
Debug.Assert(LargestDivisor((49L)) == (7L));
}
}
| [
"\n }\n"
] |
HumanEval_25_factorize | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return list of prime factors of given integer in the order from smallest to largest.
// Each of the factors should be list... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Factorize((2L)).Equals((new List<long>(new long[]{(long)2L}))));
Debug.Assert(Factorize((4L)).Equals((new List<long>(new long[]{(long)2L, (long)2L}))));
Debug.Assert(Factorize((8L)).Equals((new List<long>(new long[]{(long)2L, (long)2L, (long)2L... | [
"\n }\n"
] |
HumanEval_26_remove_duplicates | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// From a list of integers, remove all elements that occur more than once.
// Keep order of elements left the same as in the ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(RemoveDuplicates((new List<long>())).Equals((new List<long>())));
Debug.Assert(RemoveDuplicates((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))));
... | [
"\n }\n"
] |
HumanEval_27_flip_case | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// For a given string, flip lowercase characters to uppercase and uppercase to lowercase.
// >>> FlipCase(("Hello"))
// (... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FlipCase(("")).Equals(("")));
Debug.Assert(FlipCase(("Hello!")).Equals(("hELLO!")));
Debug.Assert(FlipCase(("These violent delights have violent ends")).Equals(("tHESE VIOLENT DELIGHTS HAVE VIOLENT ENDS")));
}
}
| [
"\n }\n"
] |
HumanEval_28_concatenate | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Concatenate list of strings into a single string
// >>> Concatenate((new List<string>()))
// ("")
// >>> Concatena... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Concatenate((new List<string>())).Equals(("")));
Debug.Assert(Concatenate((new List<string>(new string[]{(string)"x", (string)"y", (string)"z"}))).Equals(("xyz")));
Debug.Assert(Concatenate((new List<string>(new string[]{(string)"x", (string)"y... | [
"\n }\n"
] |
HumanEval_29_filter_by_prefix | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Filter an input list of strings only for ones that start with a given prefix.
// >>> FilterByPrefix((new List<string>()), ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FilterByPrefix((new List<string>()), ("john")).Equals((new List<string>())));
Debug.Assert(FilterByPrefix((new List<string>(new string[]{(string)"xxx", (string)"asd", (string)"xxy", (string)"john doe", (string)"xxxAAA", (string)"xxx"})), ("xxx")).E... | [
"\n }\n"
] |
HumanEval_2_truncate_number | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a positive floating point number, it can be decomposed into
// and integer part (largest integer smaller than given ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(TruncateNumber((3.5f)) == (0.5f));
Debug.Assert(TruncateNumber((1.25f)) == (0.25f));
Debug.Assert(TruncateNumber((123.0f)) == (0.0f));
}
}
| [
"\n }\n"
] |
HumanEval_30_get_positive | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return only positive numbers in the list.
// >>> GetPositive((new List<long>(new long[]{(long)-1L, (long)2L, (long)-4L, (l... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(GetPositive((new List<long>(new long[]{(long)-1L, (long)-2L, (long)4L, (long)5L, (long)6L}))).Equals((new List<long>(new long[]{(long)4L, (long)5L, (long)6L}))));
Debug.Assert(GetPositive((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (l... | [
"\n }\n"
] |
HumanEval_31_is_prime | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return true if a given number is prime, and false otherwise.
// >>> IsPrime((6L))
// (false)
// >>> IsPrime((101L)... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IsPrime((6L)) == (false));
Debug.Assert(IsPrime((101L)) == (true));
Debug.Assert(IsPrime((11L)) == (true));
Debug.Assert(IsPrime((13441L)) == (true));
Debug.Assert(IsPrime((61L)) == (true));
Debug.Assert(IsPrime((4L)) == (false));
... | [
"\n }\n"
] |
HumanEval_33_sort_third | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// This function takes a list l and returns a list l' such that
// l' is identical to l in the indicies that are not divisibl... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SortThird((new List<long>(new long[]{(long)5L, (long)6L, (long)3L, (long)4L, (long)8L, (long)9L, (long)2L}))).Equals((new List<long>(new long[]{(long)2L, (long)6L, (long)3L, (long)4L, (long)8L, (long)9L, (long)5L}))));
Debug.Assert(SortThird((new L... | [
"\n }\n"
] |
HumanEval_34_unique | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return sorted unique elements in a list
// >>> Unique((new List<long>(new long[]{(long)5L, (long)3L, (long)5L, (long)2L, (... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Unique((new List<long>(new long[]{(long)5L, (long)3L, (long)5L, (long)2L, (long)3L, (long)3L, (long)9L, (long)0L, (long)123L}))).Equals((new List<long>(new long[]{(long)0L, (long)2L, (long)3L, (long)5L, (long)9L, (long)123L}))));
}
}
| [
"\n }\n"
] |
HumanEval_35_max_element | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return maximum element in the list.
// >>> MaxElement((new List<long>(new long[]{(long)1L, (long)2L, (long)3L})))
// (... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(MaxElement((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))) == (3L));
Debug.Assert(MaxElement((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (long)2L, (long)-3L, (long)3L, (long)9L, (long)0L, (long)124L, (long)1L, (long)-10L})... | [
"\n }\n"
] |
HumanEval_36_fizz_buzz | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.
// >>> FizzBuzz((5... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FizzBuzz((50L)) == (0L));
Debug.Assert(FizzBuzz((78L)) == (2L));
Debug.Assert(FizzBuzz((79L)) == (3L));
Debug.Assert(FizzBuzz((100L)) == (3L));
Debug.Assert(FizzBuzz((200L)) == (6L));
Debug.Assert(FizzBuzz((4000L)) == (192L));
D... | [
"\n }\n"
] |
HumanEval_37_sort_even | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// This function takes a list l and returns a list l' such that
// l' is identical to l in the odd indicies, while its values... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SortEven((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))));
Debug.Assert(SortEven((new List<long>(new long[]{(long)5L, (long)3L, (long)-5L, (long)2L, (long)-3L, (long)3L,... | [
"\n }\n"
] |
HumanEval_39_prime_fib | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// prime_fib returns n-th number that is a Fibonacci number and it's also prime.
// >>> PrimeFib((1L))
// (2L)
// >>>... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(PrimeFib((1L)) == (2L));
Debug.Assert(PrimeFib((2L)) == (3L));
Debug.Assert(PrimeFib((3L)) == (5L));
Debug.Assert(PrimeFib((4L)) == (13L));
Debug.Assert(PrimeFib((5L)) == (89L));
Debug.Assert(PrimeFib((6L)) == (233L));
Debug.Ass... | [
"\n }\n"
] |
HumanEval_3_below_zero | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You're given a list of deposit and withdrawal operations on a bank account that starts with
// zero balance. Your task is ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(BelowZero((new List<long>())) == (false));
Debug.Assert(BelowZero((new List<long>(new long[]{(long)1L, (long)2L, (long)-3L, (long)1L, (long)2L, (long)-3L}))) == (false));
Debug.Assert(BelowZero((new List<long>(new long[]{(long)1L, (long)2L, (lo... | [
"\n }\n"
] |
HumanEval_40_triples_sum_to_zero | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// triples_sum_to_zero takes a list of integers as an input.
// it returns true if there are three distinct elements in the l... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(TriplesSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)0L}))) == (false));
Debug.Assert(TriplesSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)-1L}))) == (false));
Debug.Assert(TriplesSumToZero(... | [
"\n }\n"
] |
HumanEval_41_car_race_collision | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Imagine a road that's a perfectly straight infinitely long line.
// n cars are driving left to right; simultaneously, a d... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CarRaceCollision((2L)) == (4L));
Debug.Assert(CarRaceCollision((3L)) == (9L));
Debug.Assert(CarRaceCollision((4L)) == (16L));
Debug.Assert(CarRaceCollision((8L)) == (64L));
Debug.Assert(CarRaceCollision((10L)) == (100L));
}
}
| [
"\n }\n"
] |
HumanEval_42_incr_list | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return list with elements incremented by 1.
// >>> IncrList((new List<long>(new long[]{(long)1L, (long)2L, (long)3L})))
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IncrList((new List<long>())).Equals((new List<long>())));
Debug.Assert(IncrList((new List<long>(new long[]{(long)3L, (long)2L, (long)1L}))).Equals((new List<long>(new long[]{(long)4L, (long)3L, (long)2L}))));
Debug.Assert(IncrList((new List<lon... | [
"\n }\n"
] |
HumanEval_43_pairs_sum_to_zero | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// pairs_sum_to_zero takes a list of integers as an input.
// it returns true if there are two distinct elements in the list ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(PairsSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)5L, (long)0L}))) == (false));
Debug.Assert(PairsSumToZero((new List<long>(new long[]{(long)1L, (long)3L, (long)-2L, (long)1L}))) == (false));
Debug.Assert(PairsSumToZero((new L... | [
"\n }\n"
] |
HumanEval_44_change_base | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Change numerical base of input number x to base.
// return string representation after the conversion.
// base numbers... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(ChangeBase((8L), (3L)).Equals(("22")));
Debug.Assert(ChangeBase((9L), (3L)).Equals(("100")));
Debug.Assert(ChangeBase((234L), (2L)).Equals(("11101010")));
Debug.Assert(ChangeBase((16L), (2L)).Equals(("10000")));
Debug.Assert(ChangeBase(... | [
"\n }\n"
] |
HumanEval_45_triangle_area | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given length of a side and high return area for a triangle.
// >>> TriangleArea((5L), (3L))
// (7.5f)
// publi... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(TriangleArea((5L), (3L)) == (7.5f));
Debug.Assert(TriangleArea((2L), (2L)) == (2.0f));
Debug.Assert(TriangleArea((10L), (8L)) == (40.0f));
}
}
| [
"\n }\n"
] |
HumanEval_46_fib4 | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
// fib4(0) -> 0
/... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Fib4((5L)) == (4L));
Debug.Assert(Fib4((8L)) == (28L));
Debug.Assert(Fib4((10L)) == (104L));
Debug.Assert(Fib4((12L)) == (386L));
}
}
| [
"\n }\n"
] |
HumanEval_47_median | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return median of elements in the list l.
// >>> Median((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Median((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, (long)5L}))) == (float)3L);
Debug.Assert(Median((new List<long>(new long[]{(long)-10L, (long)4L, (long)6L, (long)1000L, (long)10L, (long)20L}))) == (8.0f));
Debug.Assert(... | [
"\n }\n"
] |
HumanEval_48_is_palindrome | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Checks if given string is a palindrome
// >>> IsPalindrome((""))
// (true)
// >>> IsPalindrome(("aba"))
// (tr... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IsPalindrome(("")) == (true));
Debug.Assert(IsPalindrome(("aba")) == (true));
Debug.Assert(IsPalindrome(("aaaaa")) == (true));
Debug.Assert(IsPalindrome(("zbcd")) == (false));
Debug.Assert(IsPalindrome(("xywyx")) == (true));
Debug.A... | [
"\n }\n"
] |
HumanEval_49_modp | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return 2^n modulo p (be aware of numerics).
// >>> Modp((3L), (5L))
// (3L)
// >>> Modp((1101L), (101L))
// (2... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Modp((3L), (5L)) == (3L));
Debug.Assert(Modp((1101L), (101L)) == (2L));
Debug.Assert(Modp((0L), (101L)) == (1L));
Debug.Assert(Modp((3L), (11L)) == (8L));
Debug.Assert(Modp((100L), (101L)) == (1L));
Debug.Assert(Modp((30L), (5L)) ==... | [
"\n }\n"
] |
HumanEval_4_mean_absolute_deviation | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// For a given list of input numbers, calculate Mean Absolute Deviation
// around the mean of this dataset.
// Mean Absol... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(MeanAbsoluteDeviation((new List<float>(new float[]{(float)1.0f, (float)2.0f}))) == (0.5f));
Debug.Assert(MeanAbsoluteDeviation((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f, (float)4.0f}))) == (1.0f));
Debug.Assert(MeanAbso... | [
"\n }\n"
] |
HumanEval_51_remove_vowels | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// remove_vowels is a function that takes string and returns string without vowels.
// >>> RemoveVowels((""))
// ("")
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(RemoveVowels(("")).Equals(("")));
Debug.Assert(RemoveVowels(("abcdef\nghijklm")).Equals(("bcdf\nghjklm")));
Debug.Assert(RemoveVowels(("fedcba")).Equals(("fdcb")));
Debug.Assert(RemoveVowels(("eeeee")).Equals(("")));
Debug.Assert(Remove... | [
"\n }\n"
] |
HumanEval_52_below_threshold | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return true if all numbers in the list l are below threshold t.
// >>> BelowThreshold((new List<long>(new long[]{(long)1L,... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(BelowThreshold((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)10L})), (100L)) == (true));
Debug.Assert(BelowThreshold((new List<long>(new long[]{(long)1L, (long)20L, (long)4L, (long)10L})), (5L)) == (false));
Debug.Assert(BelowT... | [
"\n }\n"
] |
HumanEval_53_add | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Add two numbers x and y
// >>> Add((2L), (3L))
// (5L)
// >>> Add((5L), (7L))
// (12L)
// public stati... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Add((0L), (1L)) == (1L));
Debug.Assert(Add((1L), (0L)) == (1L));
Debug.Assert(Add((2L), (3L)) == (5L));
Debug.Assert(Add((5L), (7L)) == (12L));
Debug.Assert(Add((7L), (5L)) == (12L));
}
}
| [
"\n }\n"
] |
HumanEval_54_same_chars | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Check if two words have the same characters.
// >>> SameChars(("eabcdzzzz"), ("dddzzzzzzzddeddabc"))
// (true)
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SameChars(("eabcdzzzz"), ("dddzzzzzzzddeddabc")) == (true));
Debug.Assert(SameChars(("abcd"), ("dddddddabc")) == (true));
Debug.Assert(SameChars(("dddddddabc"), ("abcd")) == (true));
Debug.Assert(SameChars(("eabcd"), ("dddddddabc")) == (fal... | [
"\n }\n"
] |
HumanEval_55_fib | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return n-th Fibonacci number.
// >>> Fib((10L))
// (55L)
// >>> Fib((1L))
// (1L)
// >>> Fib((8L))
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Fib((10L)) == (55L));
Debug.Assert(Fib((1L)) == (1L));
Debug.Assert(Fib((8L)) == (21L));
Debug.Assert(Fib((11L)) == (89L));
Debug.Assert(Fib((12L)) == (144L));
}
}
| [
"\n }\n"
] |
HumanEval_56_correct_bracketing | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// brackets is a string of "<" and ">".
// return true if every opening bracket has a corresponding closing bracket.
// >... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CorrectBracketing(("<>")) == (true));
Debug.Assert(CorrectBracketing(("<<><>>")) == (true));
Debug.Assert(CorrectBracketing(("<><><<><>><>")) == (true));
Debug.Assert(CorrectBracketing(("<><><<<><><>><>><<><><<>>>")) == (true));
Debug.A... | [
"\n }\n"
] |
HumanEval_57_monotonic | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return true is list elements are monotonically increasing or decreasing.
// >>> Monotonic((new List<long>(new long[]{(long... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Monotonic((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)10L}))) == (true));
Debug.Assert(Monotonic((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)20L}))) == (true));
Debug.Assert(Monotonic((new List<long>(new lo... | [
"\n }\n"
] |
HumanEval_58_common | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return sorted unique common elements for two lists.
// >>> Common((new List<long>(new long[]{(long)1L, (long)4L, (long)3L,... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Common((new List<long>(new long[]{(long)1L, (long)4L, (long)3L, (long)34L, (long)653L, (long)2L, (long)5L})), (new List<long>(new long[]{(long)5L, (long)7L, (long)1L, (long)5L, (long)9L, (long)653L, (long)121L}))).Equals((new List<long>(new long[]{(lon... | [
"\n }\n"
] |
HumanEval_59_largest_prime_factor | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Return the largest prime factor of n. Assume n > 1 and is not a prime.
// >>> LargestPrimeFactor((13195L))
// (29L)
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(LargestPrimeFactor((15L)) == (5L));
Debug.Assert(LargestPrimeFactor((27L)) == (3L));
Debug.Assert(LargestPrimeFactor((63L)) == (7L));
Debug.Assert(LargestPrimeFactor((330L)) == (11L));
Debug.Assert(LargestPrimeFactor((13195L)) == (29L))... | [
"\n }\n"
] |
HumanEval_5_intersperse | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Insert a number 'delimeter' between every two consecutive elements of input list `numbers'
// >>> Intersperse((new List<lo... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Intersperse((new List<long>()), (7L)).Equals((new List<long>())));
Debug.Assert(Intersperse((new List<long>(new long[]{(long)5L, (long)6L, (long)3L, (long)2L})), (8L)).Equals((new List<long>(new long[]{(long)5L, (long)8L, (long)6L, (long)8L, (long)... | [
"\n }\n"
] |
HumanEval_60_sum_to_n | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// sum_to_n is a function that sums numbers from 1 to n.
// >>> SumToN((30L))
// (465L)
// >>> SumToN((100L))
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SumToN((1L)) == (1L));
Debug.Assert(SumToN((6L)) == (21L));
Debug.Assert(SumToN((11L)) == (66L));
Debug.Assert(SumToN((30L)) == (465L));
Debug.Assert(SumToN((100L)) == (5050L));
}
}
| [
"\n }\n"
] |
HumanEval_61_correct_bracketing | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// brackets is a string of "(" and ")".
// return true if every opening bracket has a corresponding closing bracket.
// >... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CorrectBracketing(("()")) == (true));
Debug.Assert(CorrectBracketing(("(()())")) == (true));
Debug.Assert(CorrectBracketing(("()()(()())()")) == (true));
Debug.Assert(CorrectBracketing(("()()((()()())())(()()(()))")) == (true));
Debug.A... | [
"\n }\n"
] |
HumanEval_62_derivative | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// xs represent coefficients of a polynomial.
// xs[0] + xs[1] * x + xs[2] * x^2 + ....
// Return derivative of this poly... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Derivative((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, (long)5L}))).Equals((new List<long>(new long[]{(long)1L, (long)4L, (long)12L, (long)20L}))));
Debug.Assert(Derivative((new List<long>(new long[]{(long)1L, (long)2L, (long... | [
"\n }\n"
] |
HumanEval_63_fibfib | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:
// fibfib(0) == 0
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Fibfib((2L)) == (1L));
Debug.Assert(Fibfib((1L)) == (0L));
Debug.Assert(Fibfib((5L)) == (4L));
Debug.Assert(Fibfib((8L)) == (24L));
Debug.Assert(Fibfib((10L)) == (81L));
Debug.Assert(Fibfib((12L)) == (274L));
Debug.Assert(Fibfib... | [
"\n }\n"
] |
HumanEval_64_vowels_count | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function vowels_count which takes a string representing
// a word as input and returns the number of vowels in the... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(VowelsCount(("abcde")) == (2L));
Debug.Assert(VowelsCount(("Alone")) == (3L));
Debug.Assert(VowelsCount(("key")) == (2L));
Debug.Assert(VowelsCount(("bye")) == (1L));
Debug.Assert(VowelsCount(("keY")) == (2L));
Debug.Assert(VowelsCo... | [
"\n }\n"
] |
HumanEval_65_circular_shift | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Circular shift the digits of the integer x, shift the digits right by shift
// and return the result as a string.
// I... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(CircularShift((100L), (2L)).Equals(("001")));
Debug.Assert(CircularShift((12L), (2L)).Equals(("12")));
Debug.Assert(CircularShift((97L), (8L)).Equals(("79")));
Debug.Assert(CircularShift((12L), (1L)).Equals(("21")));
Debug.Assert(Circul... | [
"\n }\n"
] |
HumanEval_66_digitSum | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Task
// Write a function that takes a string as input and returns the sum of the upper characters only'
// ASCII codes... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Digitsum(("")) == (0L));
Debug.Assert(Digitsum(("abAB")) == (131L));
Debug.Assert(Digitsum(("abcCd")) == (67L));
Debug.Assert(Digitsum(("helloE")) == (69L));
Debug.Assert(Digitsum(("woArBld")) == (131L));
Debug.Assert(Digitsum(("aAa... | [
"\n }\n"
] |
HumanEval_67_fruit_distribution | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// In this task, you will be given a string that represents a number of apples and oranges
// that are distributed in a bask... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FruitDistribution(("5 apples and 6 oranges"), (19L)) == (8L));
Debug.Assert(FruitDistribution(("5 apples and 6 oranges"), (21L)) == (10L));
Debug.Assert(FruitDistribution(("0 apples and 1 oranges"), (3L)) == (2L));
Debug.Assert(FruitDistrib... | [
"\n }\n"
] |
HumanEval_68_pluck | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// "Given a list representing a branch of a tree that has non-negative integer nodes
// your task is to pluck one of the node... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Pluck((new List<long>(new long[]{(long)4L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)2L, (long)1L}))));
Debug.Assert(Pluck((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))).Equals((new List<long>(new long[]{(long)2L, ... | [
"\n }\n"
] |
HumanEval_69_search | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given a non-empty list of positive integers. Return the greatest integer that is greater than
// zero, and has a ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Search((new List<long>(new long[]{(long)5L, (long)5L, (long)5L, (long)5L, (long)1L}))) == (1L));
Debug.Assert(Search((new List<long>(new long[]{(long)4L, (long)1L, (long)4L, (long)1L, (long)4L, (long)4L}))) == (4L));
Debug.Assert(Search((new Li... | [
"\n }\n"
] |
HumanEval_6_parse_nested_parens | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Input to this function is a string represented multiple groups for nested parentheses separated by spaces.
// For each of ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(ParseNestedParens(("(()()) ((())) () ((())()())")).Equals((new List<long>(new long[]{(long)2L, (long)3L, (long)1L, (long)3L}))));
Debug.Assert(ParseNestedParens(("() (()) ((())) (((())))")).Equals((new List<long>(new long[]{(long)1L, (long)2L, (lon... | [
"\n }\n"
] |
HumanEval_70_strange_sort_list | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given list of integers, return list in strange order.
// Strange sorting, is when you start with the minimum value,
//... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(StrangeSortList((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)4L, (long)2L, (long)3L}))));
Debug.Assert(StrangeSortList((new List<long>(new long[]{(long)5L, (long)6L, (long)7... | [
"\n }\n"
] |
HumanEval_71_triangle_area | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given the lengths of the three sides of a triangle. Return the area of
// the triangle rounded to 2 decimal points if the ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(TriangleArea((3L), (4L), (5L)) == (6.0f));
Debug.Assert(TriangleArea((1L), (2L), (10L)) == (float)-1L);
Debug.Assert(TriangleArea((4L), (8L), (5L)) == (8.18f));
Debug.Assert(TriangleArea((2L), (2L), (2L)) == (1.73f));
Debug.Assert(Trian... | [
"\n }\n"
] |
HumanEval_72_will_it_fly | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that returns true if the object q will fly, and false otherwise.
// The object q will fly if it's balance... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(WillItFly((new List<long>(new long[]{(long)3L, (long)2L, (long)3L})), (9L)) == (true));
Debug.Assert(WillItFly((new List<long>(new long[]{(long)1L, (long)2L})), (5L)) == (false));
Debug.Assert(WillItFly((new List<long>(new long[]{(long)3L})), (... | [
"\n }\n"
] |
HumanEval_73_smallest_change | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a list arr of integers, find the minimum number of elements that
// need to be changed to make the list palindromic.... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SmallestChange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)5L, (long)4L, (long)7L, (long)9L, (long)6L}))) == (4L));
Debug.Assert(SmallestChange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)3L, (long)2L... | [
"\n }\n"
] |
HumanEval_74_total_match | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that accepts two lists of strings and returns the list that has
// total number of chars in the all stri... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(TotalMatch((new List<string>()), (new List<string>())).Equals((new List<string>())));
Debug.Assert(TotalMatch((new List<string>(new string[]{(string)"hi", (string)"admin"})), (new List<string>(new string[]{(string)"hi", (string)"hi"}))).Equals((new... | [
"\n }\n"
] |
HumanEval_75_is_multiply_prime | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that returns true if the given number is the multiplication of 3 prime numbers
// and false otherwise.
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IsMultiplyPrime((5L)) == (false));
Debug.Assert(IsMultiplyPrime((30L)) == (true));
Debug.Assert(IsMultiplyPrime((8L)) == (true));
Debug.Assert(IsMultiplyPrime((10L)) == (false));
Debug.Assert(IsMultiplyPrime((125L)) == (true));
Debu... | [
"\n }\n"
] |
HumanEval_76_is_simple_power | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Your task is to write a function that returns true if a number x is a simple
// power of n and false in other cases.
/... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IsSimplePower((16L), (2L)) == (true));
Debug.Assert(IsSimplePower((143214L), (16L)) == (false));
Debug.Assert(IsSimplePower((4L), (2L)) == (true));
Debug.Assert(IsSimplePower((9L), (3L)) == (true));
Debug.Assert(IsSimplePower((16L), (4L... | [
"\n }\n"
] |
HumanEval_77_iscube | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that takes an integer a and returns true
// if this ingeger is a cube of some integer number.
// Not... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Iscube((1L)) == (true));
Debug.Assert(Iscube((2L)) == (false));
Debug.Assert(Iscube((-1L)) == (true));
Debug.Assert(Iscube((64L)) == (true));
Debug.Assert(Iscube((180L)) == (false));
Debug.Assert(Iscube((1000L)) == (true));
Debu... | [
"\n }\n"
] |
HumanEval_78_hex_key | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You have been tasked to write a function that receives
// a hexadecimal number as a string and counts the number of hexad... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(HexKey(("AB")) == (1L));
Debug.Assert(HexKey(("1077E")) == (2L));
Debug.Assert(HexKey(("ABED1A33")) == (4L));
Debug.Assert(HexKey(("2020")) == (2L));
Debug.Assert(HexKey(("123456789ABCDEF0")) == (6L));
Debug.Assert(HexKey(("11223344... | [
"\n }\n"
] |
HumanEval_79_decimal_to_binary | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You will be given a number in decimal form and your task is to convert it to
// binary format. The function should return ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(DecimalToBinary((0L)).Equals(("db0db")));
Debug.Assert(DecimalToBinary((32L)).Equals(("db100000db")));
Debug.Assert(DecimalToBinary((103L)).Equals(("db1100111db")));
Debug.Assert(DecimalToBinary((15L)).Equals(("db1111db")));
}
}
| [
"\n }\n"
] |
HumanEval_7_filter_by_substring | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Filter an input list of strings only for ones that contain given substring
// >>> FilterBySubstring((new List<string>()), ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(FilterBySubstring((new List<string>()), ("john")).Equals((new List<string>())));
Debug.Assert(FilterBySubstring((new List<string>(new string[]{(string)"xxx", (string)"asd", (string)"xxy", (string)"john doe", (string)"xxxAAA", (string)"xxx"})), ("xx... | [
"\n }\n"
] |
HumanEval_80_is_happy | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given a string s.
// Your task is to check if the string is hapcs or not.
// A string is hapcs if its length i... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(IsHappy(("a")) == (false));
Debug.Assert(IsHappy(("aa")) == (false));
Debug.Assert(IsHappy(("abcd")) == (true));
Debug.Assert(IsHappy(("aabb")) == (false));
Debug.Assert(IsHappy(("adb")) == (true));
Debug.Assert(IsHappy(("xyy")) == ... | [
"\n }\n"
] |
HumanEval_81_numerical_letter_grade | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// It is the last week of the semester and the teacher has to give the grades
// to students. The teacher has been making her... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(NumericalLetterGrade((new List<float>(new float[]{(float)4.0f, (float)3L, (float)1.7f, (float)2L, (float)3.5f}))).Equals((new List<string>(new string[]{(string)"A+", (string)"B", (string)"C-", (string)"C", (string)"A-"}))));
Debug.Assert(NumericalL... | [
"\n }\n"
] |
HumanEval_82_prime_length | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that takes a string and returns true if the string
// length is a prime number or false otherwise
// ... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(PrimeLength(("Hello")) == (true));
Debug.Assert(PrimeLength(("abcdcba")) == (true));
Debug.Assert(PrimeLength(("kittens")) == (true));
Debug.Assert(PrimeLength(("orange")) == (false));
Debug.Assert(PrimeLength(("wow")) == (true));
D... | [
"\n }\n"
] |
HumanEval_83_starts_one_ends | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a positive integer n, return the count of the numbers of n-digit
// positive integers that start or end with 1.
... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(StartsOneEnds((1L)) == (1L));
Debug.Assert(StartsOneEnds((2L)) == (18L));
Debug.Assert(StartsOneEnds((3L)) == (180L));
Debug.Assert(StartsOneEnds((4L)) == (1800L));
Debug.Assert(StartsOneEnds((5L)) == (18000L));
}
}
| [
"\n }\n"
] |
HumanEval_84_solve | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a positive integer N, return the total sum of its digits in binary.
// Example
// >>> Solve((1000L))
// ("1"... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Solve((1000L)).Equals(("1")));
Debug.Assert(Solve((150L)).Equals(("110")));
Debug.Assert(Solve((147L)).Equals(("1100")));
Debug.Assert(Solve((333L)).Equals(("1001")));
Debug.Assert(Solve((963L)).Equals(("10010")));
}
}
| [
"\n }\n"
] |
HumanEval_85_add | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a non-empty list of integers lst. add the even elements that are at odd indices..
// Examples:
// >>> Add((new L... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Add((new List<long>(new long[]{(long)4L, (long)88L}))) == (88L));
Debug.Assert(Add((new List<long>(new long[]{(long)4L, (long)5L, (long)6L, (long)7L, (long)2L, (long)122L}))) == (122L));
Debug.Assert(Add((new List<long>(new long[]{(long)4L, (lo... | [
"\n }\n"
] |
HumanEval_86_anti_shuffle | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Write a function that takes a string and returns an ordered version of it.
// Ordered version of string, is a string where... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(AntiShuffle(("Hi")).Equals(("Hi")));
Debug.Assert(AntiShuffle(("hello")).Equals(("ehllo")));
Debug.Assert(AntiShuffle(("number")).Equals(("bemnru")));
Debug.Assert(AntiShuffle(("abcd")).Equals(("abcd")));
Debug.Assert(AntiShuffle(("Hell... | [
"\n }\n"
] |
HumanEval_87_get_row | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// You are given a 2 dimensional data, as a nested lists,
// which is similar to matrix, however, unlike matrices,
// eac... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(GetRow((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L, (long)6L}), (List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)1L, (long)6L}), (List<... | [
"\n }\n"
] |
HumanEval_88_sort_array | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Given a list of non-negative integers, return a cocs of the given list after sorting,
// you will sort the given list in a... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(SortArray((new List<long>())).Equals((new List<long>())));
Debug.Assert(SortArray((new List<long>(new long[]{(long)5L}))).Equals((new List<long>(new long[]{(long)5L}))));
Debug.Assert(SortArray((new List<long>(new long[]{(long)2L, (long)4L, (lo... | [
"\n }\n"
] |
HumanEval_89_encrypt | cs | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// Create a function encrypt that takes a string as an argument and
// returns a string encrypted with the alphabet being rot... | transform | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py | reworded | }
public static void Main(string[] args) {
Debug.Assert(Encrypt(("hi")).Equals(("lm")));
Debug.Assert(Encrypt(("asdfghjkl")).Equals(("ewhjklnop")));
Debug.Assert(Encrypt(("gf")).Equals(("kj")));
Debug.Assert(Encrypt(("et")).Equals(("ix")));
Debug.Assert(Encrypt(("faewfawefaewg")).Equals(("je... | [
"\n }\n"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.