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_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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py
verbatim
} 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. // public static string RemoveVowels(...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py
verbatim
} 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. // public static bool BelowThreshold(List<long> l, lon...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py
verbatim
} 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 // public static long Add(long x, long y) {
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py
verbatim
} 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. // public static bool SameChars(string s0, string s1) {
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py
verbatim
} 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. // public static long Fib(long n) {
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py
verbatim
} 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. // ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py
verbatim
} 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. // public static bool Monotonic(List<long> l)...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py
verbatim
} 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. // public static List<long> Common(List<long> l1, List<long> l2) {...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py
verbatim
} 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. // public static long LargestPrimeFactor(long n...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py
verbatim
} 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' // public static List<long>...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py
verbatim
} 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. // public static long SumToN(long n) {
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py
verbatim
} 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. // ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py
verbatim
} 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 ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py
verbatim
} 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 an array representing a branch of a tree that has non-negative integer nodes // your task is to pluck one of the no...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py
verbatim
} 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 ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py
verbatim
} 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 ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py
verbatim
} 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, //...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py
verbatim
} 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 ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py
verbatim
} 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 an array arr of integers, find the minimum number of elements that // need to be changed to make the array palindrom...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py
verbatim
} 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. ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py
verbatim
} 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. /...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py
verbatim
} 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 ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py
verbatim
} 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 // public static List<string> FilterBySubst...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py
verbatim
} 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 happy or not. // A string is happy if its length i...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py
verbatim
} 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 // ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py
verbatim
} 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_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 // Variables: // @N integer ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py
verbatim
} 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: // public sta...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py
verbatim
} 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 an array of non-negative integers, return a copy of the given array after sorting, // you will sort the given array ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py
verbatim
} 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...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py
verbatim
} 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" ]
HumanEval_8_sum_product
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 integers, return a tuple consisting of a sum and a product of all the integers in a list. // Empty sum...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py
verbatim
} public static void Main(string[] args) { Debug.Assert(SumProduct((new List<long>())).Equals((Tuple.Create(0L, 1L)))); Debug.Assert(SumProduct((new List<long>(new long[]{(long)1L, (long)1L, (long)1L}))).Equals((Tuple.Create(3L, 1L)))); Debug.Assert(SumProduct((new List<long>(new long[]{(long)100L, ...
[ "\n }\n" ]
HumanEval_90_next_smallest
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 list of integers. // Write a function next_smallest() that returns the 2nd smallest element of the list. ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py
verbatim
} public static void Main(string[] args) { Debug.Assert(NextSmallest((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L}))).Equals(2L)); Debug.Assert(NextSmallest((new List<long>(new long[]{(long)5L, (long)1L, (long)4L, (long)3L, (long)2L}))).Equals(2L)); Debug.Assert(NextSm...
[ "\n }\n" ]
HumanEval_91_is_bored
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'll be given a string of words, and your task is to count the number // of boredoms. A boredom is a sentence that start...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py
verbatim
} public static void Main(string[] args) { Debug.Assert(IsBored(("Hello world")) == (0L)); Debug.Assert(IsBored(("Is the sky blue?")) == (0L)); Debug.Assert(IsBored(("I love It !")) == (1L)); Debug.Assert(IsBored(("bIt")) == (0L)); Debug.Assert(IsBored(("I feel good today. I will be producti...
[ "\n }\n" ]
HumanEval_92_any_int
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 that takes 3 numbers. // Returns true if one of the numbers is equal to the sum of the other two, and al...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py
verbatim
} public static void Main(string[] args) { Debug.Assert(AnyInt((float)2L, (float)3L, (float)1L) == (true)); Debug.Assert(AnyInt((2.5f), (float)2L, (float)3L) == (false)); Debug.Assert(AnyInt((1.5f), (float)5L, (3.5f)) == (false)); Debug.Assert(AnyInt((float)2L, (float)6L, (float)2L) == (false));...
[ "\n }\n" ]
HumanEval_93_encode
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 message, and encodes in such a // way that it swaps case of all letters, replaces all vowel...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Encode(("TEST")).Equals(("tgst"))); Debug.Assert(Encode(("Mudasir")).Equals(("mWDCSKR"))); Debug.Assert(Encode(("YES")).Equals(("ygs"))); Debug.Assert(Encode(("This is a message")).Equals(("tHKS KS C MGSSCGG"))); Debug.Assert(Encode(("I...
[ "\n }\n" ]
HumanEval_94_skjkasdkd
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 list of integers. // You need to find the largest prime value and return the sum of its digits. // Exa...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Skjkasdkd((new List<long>(new long[]{(long)0L, (long)3L, (long)2L, (long)1L, (long)3L, (long)5L, (long)7L, (long)4L, (long)5L, (long)5L, (long)5L, (long)2L, (long)181L, (long)32L, (long)4L, (long)32L, (long)3L, (long)2L, (long)32L, (long)324L, (long)4L...
[ "\n }\n" ]
HumanEval_95_check_dict_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 { // Given a dictionary, return True if all keys are strings in lower // case or all keys are strings in upper case, else retu...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CheckDictCase((new Dictionary<string,string>(){{"p", "pineapple"}, {"b", "banana"}})) == (true)); Debug.Assert(CheckDictCase((new Dictionary<string,string>(){{"p", "pineapple"}, {"A", "banana"}, {"B", "banana"}})) == (false)); Debug.Assert(Chec...
[ "\n }\n" ]
HumanEval_96_count_up_to
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 { // Implement a function that takes an non-negative integer and returns an array of the first n // integers that are prime num...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CountUpTo((5L)).Equals((new List<long>(new long[]{(long)2L, (long)3L})))); Debug.Assert(CountUpTo((6L)).Equals((new List<long>(new long[]{(long)2L, (long)3L, (long)5L})))); Debug.Assert(CountUpTo((7L)).Equals((new List<long>(new long[]{(long)2L...
[ "\n }\n" ]
HumanEval_97_multiply
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 { // Complete the function that takes two integers and returns // the product of their unit digits. // Assume the input is...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py
verbatim
} public static void Main(string[] args) { Debug.Assert(Multiply((148L), (412L)) == (16L)); Debug.Assert(Multiply((19L), (28L)) == (72L)); Debug.Assert(Multiply((2020L), (1851L)) == (0L)); Debug.Assert(Multiply((14L), (-15L)) == (20L)); Debug.Assert(Multiply((76L), (67L)) == (42L)); Debu...
[ "\n }\n" ]
HumanEval_98_count_upper
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 s, count the number of uppercase vowels in even indices. // For example: // public static long Coun...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py
verbatim
} public static void Main(string[] args) { Debug.Assert(CountUpper(("aBCdEf")) == (1L)); Debug.Assert(CountUpper(("abcdefg")) == (0L)); Debug.Assert(CountUpper(("dBBE")) == (0L)); Debug.Assert(CountUpper(("B")) == (0L)); Debug.Assert(CountUpper(("U")) == (1L)); Debug.Assert(CountUpper(("...
[ "\n }\n" ]
HumanEval_99_closest_integer
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 that takes a value (string) representing a number // and returns the closest integer to it. If the numbe...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py
verbatim
} public static void Main(string[] args) { Debug.Assert(ClosestInteger(("10")) == (10L)); Debug.Assert(ClosestInteger(("14.5")) == (15L)); Debug.Assert(ClosestInteger(("-15.5")) == (-16L)); Debug.Assert(ClosestInteger(("15.3")) == (15L)); Debug.Assert(ClosestInteger(("0")) == (0L)); } }...
[ "\n }\n" ]
HumanEval_9_rolling_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 { // From a given list of integers, generate a list of rolling maximum element found until given moment // in the sequence. ...
remove
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py
verbatim
} public static void Main(string[] args) { Debug.Assert(RollingMax((new List<long>())).Equals((new List<long>()))); Debug.Assert(RollingMax((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})))); Debug.Asser...
[ "\n }\n" ]
HumanEval_0_has_close_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 { // Check if in given list of numbers, are any two numbers closer to each other than // given threshold. // >>> HasCloseEl...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py
reworded
} public static void Main(string[] args) { Debug.Assert(HasCloseElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (float)4.0f, (float)5.0f, (float)2.2f})), (0.3f)) == (true)); Debug.Assert(HasCloseElements((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.9f, (fl...
[ "\n }\n" ]
HumanEval_100_make_a_pile
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, you have to make a pile of n levels of stones. // The first level has n stones. // The num...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py
reworded
} public static void Main(string[] args) { Debug.Assert(MakeAPile((3L)).Equals((new List<long>(new long[]{(long)3L, (long)5L, (long)7L})))); Debug.Assert(MakeAPile((4L)).Equals((new List<long>(new long[]{(long)4L, (long)6L, (long)8L, (long)10L})))); Debug.Assert(MakeAPile((5L)).Equals((new List<long...
[ "\n }\n" ]
HumanEval_101_words_string
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 string of words separated by commas or spaces. Your task is // to split the string into words and retu...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py
reworded
} public static void Main(string[] args) { Debug.Assert(WordsString(("Hi, my name is John")).Equals((new List<string>(new string[]{(string)"Hi", (string)"my", (string)"name", (string)"is", (string)"John"})))); Debug.Assert(WordsString(("One, two, three, four, five, six")).Equals((new List<string>(new st...
[ "\n }\n" ]
HumanEval_102_choose_num
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 two positive numbers x and y and returns the // biggest even integer number that is in the range [x, y...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py
reworded
} public static void Main(string[] args) { Debug.Assert(ChooseNum((12L), (15L)) == (14L)); Debug.Assert(ChooseNum((13L), (12L)) == (-1L)); Debug.Assert(ChooseNum((33L), (12354L)) == (12354L)); Debug.Assert(ChooseNum((5234L), (5233L)) == (-1L)); Debug.Assert(ChooseNum((6L), (29L)) == (28L)); ...
[ "\n }\n" ]
HumanEval_104_unique_digits
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 positive integers x. return a sorted list of all // elements that hasn't any even digit. // Note: Ret...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py
reworded
} public static void Main(string[] args) { Debug.Assert(UniqueDigits((new List<long>(new long[]{(long)15L, (long)33L, (long)1422L, (long)1L}))).Equals((new List<long>(new long[]{(long)1L, (long)15L, (long)33L})))); Debug.Assert(UniqueDigits((new List<long>(new long[]{(long)152L, (long)323L, (long)1422L,...
[ "\n }\n" ]
HumanEval_105_by_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 { // Given a list of integers, sort the integers that are between 1 and 9 inclusive, // reverse the resulting list, and then re...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py
reworded
} public static void Main(string[] args) { Debug.Assert(ByLength((new List<long>(new long[]{(long)2L, (long)1L, (long)1L, (long)4L, (long)5L, (long)8L, (long)2L, (long)3L}))).Equals((new List<string>(new string[]{(string)"Eight", (string)"Five", (string)"Four", (string)"Three", (string)"Two", (string)"Two",...
[ "\n }\n" ]
HumanEval_106_f
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 { // Implement the function f that takes n as a parameter, // and returns a list of size n, such that the value of the element ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py
reworded
} public static void Main(string[] args) { Debug.Assert(F((5L)).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)6L, (long)24L, (long)15L})))); Debug.Assert(F((7L)).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)6L, (long)24L, (long)15L, (long)720L, (long)28L})))); Debug.Asse...
[ "\n }\n" ]
HumanEval_107_even_odd_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 { // Given a positive integer n, return a tuple that has the number of even and odd // integer palindromes that fall within the...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py
reworded
} public static void Main(string[] args) { Debug.Assert(EvenOddPalindrome((123L)).Equals((Tuple.Create(8L, 13L)))); Debug.Assert(EvenOddPalindrome((12L)).Equals((Tuple.Create(4L, 6L)))); Debug.Assert(EvenOddPalindrome((3L)).Equals((Tuple.Create(1L, 2L)))); Debug.Assert(EvenOddPalindrome((63L)).E...
[ "\n }\n" ]
HumanEval_108_count_nums
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 count_nums which takes a list of integers and returns // the number of elements which has a sum of digits...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py
reworded
} public static void Main(string[] args) { Debug.Assert(CountNums((new List<long>())) == (0L)); Debug.Assert(CountNums((new List<long>(new long[]{(long)-1L, (long)-2L, (long)0L}))) == (0L)); Debug.Assert(CountNums((new List<long>(new long[]{(long)1L, (long)1L, (long)2L, (long)-2L, (long)3L, (long)4L...
[ "\n }\n" ]
HumanEval_109_move_one_ball
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 { // We have a list 'arr' of N integers arr[1], arr[2], ..., arr[N].The // numbers in the list will be randomly ordered. Your t...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py
reworded
} public static void Main(string[] args) { Debug.Assert(MoveOneBall((new List<long>(new long[]{(long)3L, (long)4L, (long)5L, (long)1L, (long)2L}))) == (true)); Debug.Assert(MoveOneBall((new List<long>(new long[]{(long)3L, (long)5L, (long)10L, (long)1L, (long)2L}))) == (true)); Debug.Assert(MoveOneBa...
[ "\n }\n" ]
HumanEval_10_make_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 { // Find the shortest palindrome that begins with a supplied string. // Algorithm idea is simple: // - Find the longest po...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py
reworded
} public static void Main(string[] args) { Debug.Assert(MakePalindrome(("")).Equals((""))); Debug.Assert(MakePalindrome(("x")).Equals(("x"))); Debug.Assert(MakePalindrome(("xyz")).Equals(("xyzyx"))); Debug.Assert(MakePalindrome(("xyx")).Equals(("xyx"))); Debug.Assert(MakePalindrome(("jerry")...
[ "\n }\n" ]
HumanEval_110_exchange
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 problem, you will implement a function that takes two lists of numbers, // and determines whether it is possible t...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py
reworded
} public static void Main(string[] args) { Debug.Assert(Exchange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L})), (new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L}))).Equals(("YES"))); Debug.Assert(Exchange((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (l...
[ "\n }\n" ]
HumanEval_111_histogram
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 representing a space separated lowercase letters, return a dictionary // of the letter with the most repeti...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py
reworded
} public static void Main(string[] args) { Debug.Assert(Histogram(("a b b a")).Equals((new Dictionary<string,long>(){{"a", 2L}, {"b", 2L}}))); Debug.Assert(Histogram(("a b c a b")).Equals((new Dictionary<string,long>(){{"a", 2L}, {"b", 2L}}))); Debug.Assert(Histogram(("a b c d g")).Equals((new Dicti...
[ "\n }\n" ]
HumanEval_112_reverse_delete
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 // We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py
reworded
} public static void Main(string[] args) { Debug.Assert(ReverseDelete(("abcde"), ("ae")).Equals((Tuple.Create("bcd", false)))); Debug.Assert(ReverseDelete(("abcdef"), ("b")).Equals((Tuple.Create("acdef", false)))); Debug.Assert(ReverseDelete(("abcdedcba"), ("ab")).Equals((Tuple.Create("cdedc", true)...
[ "\n }\n" ]
HumanEval_113_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 a list of strings, where each string consists of only digits, return a list. // Each element i of the output should ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py
reworded
} public static void Main(string[] args) { Debug.Assert(OddCount((new List<string>(new string[]{(string)"1234567"}))).Equals((new List<string>(new string[]{(string)"the number of odd elements 4n the str4ng 4 of the 4nput."})))); Debug.Assert(OddCount((new List<string>(new string[]{(string)"3", (string)"...
[ "\n }\n" ]
HumanEval_114_minSubArraySum
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 integers nums, find the minimum sum of any non-empty sub-list // of nums. // Example // >>> Minsub...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py
reworded
} public static void Main(string[] args) { Debug.Assert(Minsubarraysum((new List<long>(new long[]{(long)2L, (long)3L, (long)4L, (long)1L, (long)2L, (long)4L}))) == (1L)); Debug.Assert(Minsubarraysum((new List<long>(new long[]{(long)-1L, (long)-2L, (long)-3L}))) == (-6L)); Debug.Assert(Minsubarraysum...
[ "\n }\n" ]
HumanEval_115_max_fill
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 rectangular grid of wells. Each row represents a single well, // and each 1 in a row represents a single u...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py
reworded
} public static void Main(string[] args) { Debug.Assert(MaxFill((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)0L, (long)0L, (long)1L, (long)0L}), (List<long>)new List<long>(new long[]{(long)0L, (long)1L, (long)0L, (long)0L}), (List<long>)new List<long>(new long[]{(long)1...
[ "\n }\n" ]
HumanEval_116_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 { // In this Kata, you have to sort a list of non-negative integers according to // number of ones in their binary representati...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py
reworded
} public static void Main(string[] args) { Debug.Assert(SortArray((new List<long>(new long[]{(long)1L, (long)5L, (long)2L, (long)3L, (long)4L}))).Equals((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)3L, (long)5L})))); Debug.Assert(SortArray((new List<long>(new long[]{(long)-2L, (long)-3...
[ "\n }\n" ]
HumanEval_117_select_words
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 s and a natural number n, you have been tasked to implement // a function that returns a list of all words...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py
reworded
} public static void Main(string[] args) { Debug.Assert(SelectWords(("Mary had a little lamb"), (4L)).Equals((new List<string>(new string[]{(string)"little"})))); Debug.Assert(SelectWords(("Mary had a little lamb"), (3L)).Equals((new List<string>(new string[]{(string)"Mary", (string)"lamb"})))); Deb...
[ "\n }\n" ]
HumanEval_118_get_closest_vowel
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 word. Your task is to find the closest vowel that stands between // two consonants from the right side of...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py
reworded
} public static void Main(string[] args) { Debug.Assert(GetClosestVowel(("yogurt")).Equals(("u"))); Debug.Assert(GetClosestVowel(("full")).Equals(("u"))); Debug.Assert(GetClosestVowel(("easy")).Equals((""))); Debug.Assert(GetClosestVowel(("eAsy")).Equals((""))); Debug.Assert(GetClosestVowel(...
[ "\n }\n" ]
HumanEval_119_match_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 { // You are given a list of two strings, both strings consist of open // parentheses '(' or close parentheses ')' only. //...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py
reworded
} public static void Main(string[] args) { Debug.Assert(MatchParens((new List<string>(new string[]{(string)"()(", (string)")"}))).Equals(("Yes"))); Debug.Assert(MatchParens((new List<string>(new string[]{(string)")", (string)")"}))).Equals(("No"))); Debug.Assert(MatchParens((new List<string>(new str...
[ "\n }\n" ]
HumanEval_11_string_xor
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 are two strings a and b consisting only of 1s and 0s. // Perform binary XOR on these inputs and return result also a...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py
reworded
} public static void Main(string[] args) { Debug.Assert(StringXor(("111000"), ("101010")).Equals(("010010"))); Debug.Assert(StringXor(("1"), ("1")).Equals(("0"))); Debug.Assert(StringXor(("0101"), ("0000")).Equals(("0101"))); } }
[ "\n }\n" ]
HumanEval_120_maximum
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 and a positive integer k, return a sorted list // of length k with the maximum k numbers in ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py
reworded
} public static void Main(string[] args) { Debug.Assert(Maximum((new List<long>(new long[]{(long)-3L, (long)-4L, (long)5L})), (3L)).Equals((new List<long>(new long[]{(long)-4L, (long)-3L, (long)5L})))); Debug.Assert(Maximum((new List<long>(new long[]{(long)4L, (long)-4L, (long)4L})), (2L)).Equals((new L...
[ "\n }\n" ]
HumanEval_121_solution
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, return the sum of all of the odd elements that are in even positions. // Examples ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py
reworded
} public static void Main(string[] args) { Debug.Assert(Solution((new List<long>(new long[]{(long)5L, (long)8L, (long)7L, (long)1L}))) == (12L)); Debug.Assert(Solution((new List<long>(new long[]{(long)3L, (long)3L, (long)3L, (long)3L, (long)3L}))) == (9L)); Debug.Assert(Solution((new List<long>(new ...
[ "\n }\n" ]
HumanEval_122_add_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 { // Given a non-empty list of integers arr and an integer k, return // the sum of the elements with at most two digits from th...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py
reworded
} public static void Main(string[] args) { Debug.Assert(AddElements((new List<long>(new long[]{(long)1L, (long)-2L, (long)-3L, (long)41L, (long)57L, (long)76L, (long)87L, (long)88L, (long)99L})), (3L)) == (-4L)); Debug.Assert(AddElements((new List<long>(new long[]{(long)111L, (long)121L, (long)3L, (long...
[ "\n }\n" ]
HumanEval_123_get_odd_collatz
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 a sorted list that has the odd numbers in collatz sequence. // The Collatz conjecture i...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py
reworded
} public static void Main(string[] args) { Debug.Assert(GetOddCollatz((14L)).Equals((new List<long>(new long[]{(long)1L, (long)5L, (long)7L, (long)11L, (long)13L, (long)17L})))); Debug.Assert(GetOddCollatz((5L)).Equals((new List<long>(new long[]{(long)1L, (long)5L})))); Debug.Assert(GetOddCollatz((1...
[ "\n }\n" ]
HumanEval_124_valid_date
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 to write a function which validates a given date string and // returns true if the date is valid otherwise false....
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py
reworded
} public static void Main(string[] args) { Debug.Assert(ValidDate(("03-11-2000")) == (true)); Debug.Assert(ValidDate(("15-01-2012")) == (false)); Debug.Assert(ValidDate(("04-0-2040")) == (false)); Debug.Assert(ValidDate(("06-04-2020")) == (true)); Debug.Assert(ValidDate(("01-01-2007")) == (t...
[ "\n }\n" ]
HumanEval_126_is_sorted
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 whether or not they are sorted // in ascending order. If list has more than 1 duplicate of...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py
reworded
} public static void Main(string[] args) { Debug.Assert(IsSorted((new List<long>(new long[]{(long)5L}))) == (true)); Debug.Assert(IsSorted((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (long)4L, (long)5L}))) == (true)); Debug.Assert(IsSorted((new List<long>(new long[]{(long)1L, (long)3L, ...
[ "\n }\n" ]
HumanEval_127_intersection
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 two intervals, // where each interval is a pair of integers. For example, interval = (start, end) = (1, 2). ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py
reworded
} public static void Main(string[] args) { Debug.Assert(Intersection((Tuple.Create(1L, 2L)), (Tuple.Create(2L, 3L))).Equals(("NO"))); Debug.Assert(Intersection((Tuple.Create(-1L, 1L)), (Tuple.Create(0L, 4L))).Equals(("NO"))); Debug.Assert(Intersection((Tuple.Create(-3L, -1L)), (Tuple.Create(-5L, 5L)...
[ "\n }\n" ]
HumanEval_128_prod_signs
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 list arr of integers and you need to return // sum of magnitudes of integers multiplied by product of all ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py
reworded
} public static void Main(string[] args) { Debug.Assert(ProdSigns((new List<long>(new long[]{(long)1L, (long)2L, (long)2L, (long)-4L}))).Equals(-9L)); Debug.Assert(ProdSigns((new List<long>(new long[]{(long)0L, (long)1L}))).Equals(0L)); Debug.Assert(ProdSigns((new List<long>(new long[]{(long)1L, (lo...
[ "\n }\n" ]
HumanEval_129_minPath
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 grid with N rows and N columns (N >= 2) and a positive integer k, // each cell of the grid contains a value. Ever...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py
reworded
} public static void Main(string[] args) { Debug.Assert(Minpath((new List<List<long>>(new List<long>[]{(List<long>)new List<long>(new long[]{(long)1L, (long)2L, (long)3L}), (List<long>)new List<long>(new long[]{(long)4L, (long)5L, (long)6L}), (List<long>)new List<long>(new long[]{(long)7L, (long)8L, (long)9...
[ "\n }\n" ]
HumanEval_12_longest
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 { // Out of list of strings, return the longest one. Return the first one in case of multiple // strings of the same length. Re...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py
reworded
} public static void Main(string[] args) { Debug.Assert(Longest((new List<string>())).Equals(null)); Debug.Assert(Longest((new List<string>(new string[]{(string)"x", (string)"y", (string)"z"}))).Equals(("x"))); Debug.Assert(Longest((new List<string>(new string[]{(string)"x", (string)"yyy", (string)"...
[ "\n }\n" ]
HumanEval_130_tri
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 { // Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in // the last couple centuries. However, what...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py
reworded
} public static void Main(string[] args) { Debug.Assert(Tri((3L)).Equals((new List<long>(new long[]{(long)1L, (long)3L, (long)2L, (long)8L})))); Debug.Assert(Tri((4L)).Equals((new List<long>(new long[]{(long)1L, (long)3L, (long)2L, (long)8L, (long)3L})))); Debug.Assert(Tri((5L)).Equals((new List<lon...
[ "\n }\n" ]
HumanEval_131_digits
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 product of the odd digits. // Return 0 if all digits are even. // For example: ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py
reworded
} public static void Main(string[] args) { Debug.Assert(Digits((5L)) == (5L)); Debug.Assert(Digits((54L)) == (5L)); Debug.Assert(Digits((120L)) == (1L)); Debug.Assert(Digits((5014L)) == (5L)); Debug.Assert(Digits((98765L)) == (315L)); Debug.Assert(Digits((5576543L)) == (2625L)); Debu...
[ "\n }\n" ]
HumanEval_132_is_nested
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 that takes a string as input which contains only square brackets. // The function should return true if ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py
reworded
} public static void Main(string[] args) { Debug.Assert(IsNested(("[[]]")) == (true)); Debug.Assert(IsNested(("[]]]]]]][[[[[]")) == (false)); Debug.Assert(IsNested(("[][]")) == (false)); Debug.Assert(IsNested(("[]")) == (false)); Debug.Assert(IsNested(("[[[[]]]]")) == (true)); Debug.Asse...
[ "\n }\n" ]
HumanEval_133_sum_squares
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 list of numbers. // You need to return the sum of squared numbers in the given list, // round each ele...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py
reworded
} public static void Main(string[] args) { Debug.Assert(SumSquares((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f}))) == (14L)); Debug.Assert(SumSquares((new List<float>(new float[]{(float)1.0f, (float)2.0f, (float)3.0f}))) == (14L)); Debug.Assert(SumSquares((new List<float>(new ...
[ "\n }\n" ]
HumanEval_134_check_if_last_char_is_a_letter
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 that returns true if the last character // of a given string is an alphabetical character and is not ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py
reworded
} public static void Main(string[] args) { Debug.Assert(CheckIfLastCharIsALetter(("apple")) == (false)); Debug.Assert(CheckIfLastCharIsALetter(("apple pi e")) == (true)); Debug.Assert(CheckIfLastCharIsALetter(("eeeee")) == (false)); Debug.Assert(CheckIfLastCharIsALetter(("A")) == (true)); De...
[ "\n }\n" ]
HumanEval_135_can_arrange
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 which returns the largest index of an element which // is not greater than or equal to the element immed...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py
reworded
} public static void Main(string[] args) { Debug.Assert(CanArrange((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)3L, (long)5L}))) == (3L)); Debug.Assert(CanArrange((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)5L}))) == (-1L)); Debug.Assert(CanArrange((new List<long...
[ "\n }\n" ]
HumanEval_136_largest_smallest_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 { // Create a function that returns a tuple (a, b), where 'a' is // the largest of negative integers, and 'b' is the smallest ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py
reworded
} public static void Main(string[] args) { Debug.Assert(LargestSmallestIntegers((new List<long>(new long[]{(long)2L, (long)4L, (long)1L, (long)3L, (long)5L, (long)7L}))).Equals(Tuple.Create((Nullable<long>)null, 1L))); Debug.Assert(LargestSmallestIntegers((new List<long>(new long[]{(long)2L, (long)4L, (...
[ "\n }\n" ]
HumanEval_138_is_equal_to_sum_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 { // Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers // Example // >>> IsE...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py
reworded
} public static void Main(string[] args) { Debug.Assert(IsEqualToSumEven((4L)) == (false)); Debug.Assert(IsEqualToSumEven((6L)) == (false)); Debug.Assert(IsEqualToSumEven((8L)) == (true)); Debug.Assert(IsEqualToSumEven((10L)) == (true)); Debug.Assert(IsEqualToSumEven((11L)) == (false)); ...
[ "\n }\n" ]
HumanEval_139_special_factorial
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 Brazilian factorial is defined as: // brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1! // where n > 0 ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py
reworded
} public static void Main(string[] args) { Debug.Assert(SpecialFactorial((4L)) == (288L)); Debug.Assert(SpecialFactorial((5L)) == (34560L)); Debug.Assert(SpecialFactorial((7L)) == (125411328000L)); Debug.Assert(SpecialFactorial((1L)) == (1L)); } }
[ "\n }\n" ]
HumanEval_13_greatest_common_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 { // Return a greatest common divisor of two integers a and b // >>> GreatestCommonDivisor((3L), (5L)) // (1L) // >>> G...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py
reworded
} public static void Main(string[] args) { Debug.Assert(GreatestCommonDivisor((3L), (7L)) == (1L)); Debug.Assert(GreatestCommonDivisor((10L), (15L)) == (5L)); Debug.Assert(GreatestCommonDivisor((49L), (14L)) == (7L)); Debug.Assert(GreatestCommonDivisor((144L), (60L)) == (12L)); } }
[ "\n }\n" ]
HumanEval_140_fix_spaces
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, replace all spaces in it with underscores, // and if a string has more than 2 consecutive spaces, ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py
reworded
} public static void Main(string[] args) { Debug.Assert(FixSpaces(("Example")).Equals(("Example"))); Debug.Assert(FixSpaces(("Mudasir Hanif ")).Equals(("Mudasir_Hanif_"))); Debug.Assert(FixSpaces(("Yellow Yellow Dirty Fellow")).Equals(("Yellow_Yellow__Dirty__Fellow"))); Debug.Assert(FixSpaces(...
[ "\n }\n" ]
HumanEval_141_file_name_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 { // Create a function which takes a string representing a file's name, and returns // 'Yes' if the the file's name is valid, a...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py
reworded
} public static void Main(string[] args) { Debug.Assert(FileNameCheck(("example.txt")).Equals(("Yes"))); Debug.Assert(FileNameCheck(("1example.dll")).Equals(("No"))); Debug.Assert(FileNameCheck(("s1sdf3.asd")).Equals(("No"))); Debug.Assert(FileNameCheck(("K.dll")).Equals(("Yes"))); Debug.Ass...
[ "\n }\n" ]
HumanEval_142_sum_squares
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 will take a list of integers. For all entries in the list, the function shall square the integer entry ...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py
reworded
} public static void Main(string[] args) { Debug.Assert(SumSquares((new List<long>(new long[]{(long)1L, (long)2L, (long)3L}))) == (6L)); Debug.Assert(SumSquares((new List<long>(new long[]{(long)1L, (long)4L, (long)9L}))) == (14L)); Debug.Assert(SumSquares((new List<long>())) == (0L)); Debug.Asse...
[ "\n }\n" ]
HumanEval_143_words_in_sentence
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 representing a sentence, // the sentence contains some words separated by a space, // and you h...
transform
/home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py
reworded
} public static void Main(string[] args) { Debug.Assert(WordsInSentence(("This is a test")).Equals(("is"))); Debug.Assert(WordsInSentence(("lets go for swimming")).Equals(("go for"))); Debug.Assert(WordsInSentence(("there is no place available here")).Equals(("there is no place"))); Debug.Assert...
[ "\n }\n" ]