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_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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_104_unique_digits.py | verbatim | }
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 an array of integers, sort the integers that are between 1 and 9 inclusive,
// reverse the resulting array, and then... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_105_by_length.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_106_f.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_107_even_odd_palindrome.py | verbatim | }
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 an array of integers and returns
// the number of elements which has a sum of digi... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_108_count_nums.py | verbatim | }
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 an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The
// numbers in the array will be randomly ordered. You... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_109_move_one_ball.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_110_exchange.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_111_histogram.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_112_reverse_delete.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_113_odd_count.py | verbatim | }
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 an array of integers nums, find the minimum sum of any non-empty sub-array
// of nums.
// Example
// pub... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_114_minSubArraySum.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_115_max_fill.py | verbatim | }
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 an array of non-negative integers according to
// number of ones in their binary representa... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_116_sort_array.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_117_select_words.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_118_get_closest_vowel.py | verbatim | }
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.
//... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_119_match_parens.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py | verbatim | }
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 an array arr of integers and a positive integer k, return a sorted list
// of length k with the maximum k numbers i... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_120_maximum.py | verbatim | }
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
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_121_solution.py | verbatim | }
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 array of integers arr and an integer k, return
// the sum of the elements with at most two digits from t... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_122_add_elements.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_123_get_odd_collatz.py | verbatim | }
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.... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_124_valid_date.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_126_is_sorted.py | verbatim | }
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).
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_127_intersection.py | verbatim | }
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 an array arr of integers and you need to return
// sum of magnitudes of integers multiplied by product of al... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_128_prod_signs.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_129_minPath.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_130_tri.py | verbatim | }
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:
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_131_digits.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_132_is_nested.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_133_sum_squares.py | verbatim | }
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
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_134_check_if_last_char_is_a_letter.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_135_can_arrange.py | verbatim | }
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
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_136_largest_smallest_integers.py | verbatim | }
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
// pub... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_138_is_equal_to_sum_even.py | verbatim | }
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
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_139_special_factorial.py | verbatim | }
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
// public static long GreatestCommonDivisor(long a, long b) {... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py | verbatim | }
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,
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_140_fix_spaces.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_141_file_name_check.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_142_sum_squares.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_143_words_in_sentence.py | verbatim | }
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"
] |
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_144_simplify.py | verbatim | }
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.
//... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_145_order_by_points.py | verbatim | }
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 an array of numbers as input and returns
// the number of elements in the array that are grea... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_146_specialFilter.py | verbatim | }
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 array a of length n.
// For each i (1 ≤ i ≤ n), the valu... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_147_get_max_triples.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_148_bf.py | verbatim | }
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,
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_149_sorted_list_sum.py | verbatim | }
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
// public static List<string> AllPrefixes(str... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py | verbatim | }
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.... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_150_x_or_y.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_151_double_the_difference.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_152_compare.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_153_Strongest_Extension.py | verbatim | }
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
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_154_cycpattern_check.py | verbatim | }
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:
// public st... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_155_even_odd_count.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_156_int_to_mini_roman.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_157_right_angle_triangle.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_158_find_max.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_159_eat.py | verbatim | }
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.
// public static string StringSeq... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py | verbatim | }
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_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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_161_solve.py | verbatim | }
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 None.
// pub... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_162_string_to_md5.py | verbatim | }
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:
... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_163_generate_integers.py | verbatim | }
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
// public static long Co... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py | verbatim | }
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.
// public static lo... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py | verbatim | }
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', ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py | verbatim | }
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 python values only for integers
// public static List<long> FilterIntegers(List<object> value... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py | verbatim | }
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
// public static long Strlen(string str) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py | verbatim | }
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
// public static long LargestDivis... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py | verbatim | }
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.
// public static string FlipCas... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py | verbatim | }
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
// public static string Concatenate(List<string> strings) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py | verbatim | }
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.
// public static List<string> FilterByPr... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py | verbatim | }
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.
// public static List<long> GetPositive(List<long> l) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py | verbatim | }
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.
// public static bool IsPrime(long n) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py | verbatim | }
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
// public static List<long> Unique(List<long> l) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py | verbatim | }
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.
// public static long MaxElement(List<long> l) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py | verbatim | }
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.
// public stat... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py | verbatim | }
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.
// public static long PrimeFib(long n) {... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py | verbatim | }
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_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.
// public static List<long> IncrList(List<long> l) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py | verbatim | }
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 ... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py | verbatim | }
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... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py | verbatim | }
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.
// public static float TriangleArea(long a, long h) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py | verbatim | }
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
/... | remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py | verbatim | }
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.
// public static float Median(List<long> l) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py | verbatim | }
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
// public static bool IsPalindrome(string text) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py | verbatim | }
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).
// public static long Modp(long n, long p) {
| remove | /home/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py | verbatim | }
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"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.