stop_tokens sequencelengths 1 1 | prompt stringlengths 299 1.59k | prompt_terminology stringclasses 1
value | doctests stringclasses 1
value | name stringlengths 15 44 | tests stringlengths 190 4.93k | original stringlengths 130 159 | language stringclasses 1
value |
|---|---|---|---|---|---|---|---|
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リストnumbersの中に、与えられたthresholdより近い2つの数値が存在するか判定する
// >>> HasCloseElements((new List<float>(new float[]{(float)1.0f, (float)2... | reworded | transform | HumanEval_0_has_close_elements | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_0_has_close_elements.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数への入力は、入れ子になった括弧が複数含まれる文字列である。
// あなたの目的は、これらの括弧を別々の文字列に分割し、そのリストを返すことである。
// 分離された括弧はバランスがとれ、つまり、開いた括弧はそれぞれ適切に閉じられ... | reworded | transform | HumanEval_1_separate_paren_groups | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_1_separate_paren_groups.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 正の浮動小数点数が与えられると、それを整数部(与えられた数より小さい最大の整数)
// と小数部(常に1より小さい残余部分)に分解することができる。
// 関数は、数値の小数部を返す。
// >>> TruncateNumber... | reworded | transform | HumanEval_2_truncate_number | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_2_truncate_number.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 銀行口座に対する入出金操作のリストが与えられます。あなたのタスクは、残高ゼロから
// 始まて、口座の残高がゼロ未満になったかどうかを検出し、その時点で関数がtrueを
// 返すようにすることです。そうでなければfalseを返すように... | reworded | transform | HumanEval_3_below_zero | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_3_below_zero.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 第一引数の数値リストに対して、このデータセットの平均値を中心とした平均絶対偏差(MAD)を計算する。
// 平均絶対偏差(MAD)とは、各要素と中心点(この場合は平均値)との差の絶対値の平均である:
// MAD = 平均|x - x... | reworded | transform | HumanEval_4_mean_absolute_deviation | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_4_mean_absolute_deviation.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 数値リスト numbers 中の全ての連続する二要素の間に、'delimeterの値を挿入する
// >>> Intersperse((new List<long>()), (4L))
// (new List<long>())
... | reworded | transform | HumanEval_5_intersperse | }
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)... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_5_intersperse.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数の入力は、空白で区切られた複数の入れ子になった括弧のグループを表す文字列です。
// 各グループについて、括弧の最も深い入れ子のレベルを出力します。
// 例えば、'(()())'は最大で2レベルの入れ子になっていますが、'((... | reworded | transform | HumanEval_6_parse_nested_parens | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_6_parse_nested_parens.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列リストstringsを、与えれた部分文字列substringを含むものだけにフィルタする
// >>> FilterBySubstring((new List<string>()), ("a"))
// (new List<str... | reworded | transform | HumanEval_7_filter_by_substring | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_7_filter_by_substring.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた整数リストに対して、リスト内のすべての整数の和と積からなるタプルを返す。
// ただし、空の和は0、空の積は1とする。
// >>> SumProduct((new List<long>()))
// (Tuple.C... | reworded | transform | HumanEval_8_sum_product | }
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, ... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_8_sum_product.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた整数リストから、各要素のそこまでの最大値(ローリング最大値)のリストを生成する。
// >>> RollingMax((new List<long>(new long[]{(long)1L, (long)2L, (long)3L, (... | reworded | transform | HumanEval_9_rolling_max | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_9_rolling_max.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた文字列で始まる最短の回文を見つけてください。
// アルゴリズムのアイデアは以下の通りです:
// - 与えられた文字列の中で最も長い回文となる接尾辞を見つけます。
// - その回文の接尾辞の前に来る接頭辞を逆順にし... | reworded | transform | HumanEval_10_make_palindrome | }
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")... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_10_make_palindrome.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 引数は1と0のみからなる文字列aとbである。
// これらの引数に対して排他論理和(XOR)を実行し、結果を文字列として返す。
// >>> StringXor(("010"), ("110"))
// ("100")
... | reworded | transform | HumanEval_11_string_xor | }
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")));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_11_string_xor.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列のリストのうち、最も長いものを返す。同じ長さの文字列が
// 複数ある場合は最初のものを返す。入力リストが空の場合は null を返す。
// >>> Longest((new List<string>()))
// nu... | reworded | transform | HumanEval_12_longest | }
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)"... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_12_longest.py | cs |
[
"\n }\n"
] | 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 と b の最大公約数を返す
// >>> GreatestCommonDivisor((3L), (5L))
// (1L)
// >>> GreatestCommonDivisor((25L), (15L))
... | reworded | transform | HumanEval_13_greatest_common_divisor | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_13_greatest_common_divisor.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 引数で与えられた文字列に対して、短いものから長いものへ、全ての接頭辞のリストを返す
// >>> AllPrefixes(("abc"))
// (new List<string>(new string[]{(string)"a", (... | reworded | transform | HumanEval_14_all_prefixes | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_14_all_prefixes.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 0からnまでの数字を空白区切りで連結した文字列で返す。
// >>> StringSequence((0L))
// ("0")
// >>> StringSequence((5L))
// ("0 1 2 3 4 5"... | reworded | transform | HumanEval_15_string_sequence | }
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")));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_15_string_sequence.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列が与えられたとき、その文字列が(大文字小文字に関係なく)いくつの異なる文字が含まれているか数える
// >>> CountDistinctCharacters(("xyzXYZ"))
// (3L)
// >>> Coun... | reworded | transform | HumanEval_16_count_distinct_characters | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_16_count_distinct_characters.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数の引数は、特別なASCII形式の音符を表す文字列である。あなたの仕事は、この文字列を解析して、それぞれの音符が何拍続くかに対応する整数のリストを返すことである。
// ここに凡例がある:
// o' - 全音符、4拍続く
... | reworded | transform | HumanEval_17_parse_music | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_17_parse_music.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 部分文字列substringが文字列stringの中で何回見つかるか数える。
// 重なるケースもカウントに含まれる。
// >>> HowManyTimes((""), ("a"))
// (0L)
// >>> Ho... | reworded | transform | HumanEval_18_how_many_times | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_18_how_many_times.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 引数は'zero'から'nine'までの英単語の数を空白で区切った文字列である。
// 有効な英単語は''、'zero', 'one'、'two'、'three'、'four'、'five'、'six'、'seven'、'eight'、'nin... | reworded | transform | HumanEval_19_sort_numbers | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_19_sort_numbers.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// (少なくとも長さ2以上の)リストnumbersから、互いに最も近いものを2つ選び、
// 順番に(小さい数、大きい数)返す。
// >>> FindClosestElements((new List<float>(new float[]... | reworded | transform | HumanEval_20_find_closest_elements | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_20_find_closest_elements.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// (少なくとも 2 つ以上の要素からなる) リストnumbersに線形変換を適用し、
// 最小の数値が 0 になり、最大の数値が 1 になるリストを返す
// >>> RescaleToUnit((new List<float>(new... | reworded | transform | HumanEval_21_rescale_to_unit | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_21_rescale_to_unit.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 任意の種類の値が含まれるリストから整数値のみ抽出する
// >>> FilterIntegers((new List<object>(new string[]{(string)"a", (string)3.14f, (string)5L})))... | reworded | transform | HumanEval_22_filter_integers | }
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(... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_22_filter_integers.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 引数で与えられた文字列の長さを返す
// >>> StringLength((""))
// (0L)
// >>> StringLength(("abc"))
// (3L)
public static lon... | reworded | transform | HumanEval_23_strlen | }
public static void Main(string[] args) {
Debug.Assert(Strlen(("")) == (0L));
Debug.Assert(Strlen(("x")) == (1L));
Debug.Assert(Strlen(("asdasnakj")) == (9L));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_23_strlen.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた数nについて、nの約数のうち、nより小さい最大の数を求める
// >>> LargestDivisor((15L))
// (5L)
public static long LargestDivisor(long n) ... | reworded | transform | HumanEval_24_largest_divisor | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_24_largest_divisor.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた整数の素因数のリストを小さいものから大きいものの順に返す。各因数は、
// 因数分解で現れる回数分、リストに登場する。引数の整数は全ての因数の積に等しくな
// ければならない。
// >>> Factorize((8... | reworded | transform | HumanEval_25_factorize | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_25_factorize.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数のリストから、複数回出現する要素をすべて取り除く。
// 要素の順序は入力と同じようにする。
// >>> RemoveDuplicates((new List<long>(new long[]{(long)1L, (long)2L... | reworded | transform | HumanEval_26_remove_duplicates | }
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}))));
... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_26_remove_duplicates.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた文字列に対して、英小文字を英大文字に、英大文字を英小文字に変換する。
// >>> FlipCase(("Hello"))
// ("hELLO")
public static string FlipCase(stri... | reworded | transform | HumanEval_27_flip_case | }
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")));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_27_flip_case.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列のリストを1つの文字列に連結する
// >>> Concatenate((new List<string>()))
// ("")
// >>> Concatenate((new List<string>(new stri... | reworded | transform | HumanEval_28_concatenate | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_28_concatenate.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列のリストから、指定された接頭辞prefixで始まるものだけを取り出す。
// >>> FilterByPrefix((new List<string>()), ("a"))
// (new List<string>())
... | reworded | transform | HumanEval_29_filter_by_prefix | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_29_filter_by_prefix.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リスト内の正の数だけを返す。
// >>> GetPositive((new List<long>(new long[]{(long)-1L, (long)2L, (long)-4L, (long)5L, (long)6L})))
//... | reworded | transform | HumanEval_30_get_positive | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_30_get_positive.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた数が素数であれば真を、そうでなければ偽を返す。
// >>> IsPrime((6L))
// (false)
// >>> IsPrime((101L))
// (true)
// >>> IsPri... | reworded | transform | HumanEval_31_is_prime | }
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));
... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_31_is_prime.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数はリストlを受け取り、l'を返す。l'は、インデックスが3で割り
// 切れない場合はlと同じであるが、インデックスが3で割り切れる要素は
// ソートされている。
// >>> SortThird((new List<... | reworded | transform | HumanEval_33_sort_third | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_33_sort_third.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リスト内のユニークな要素をソートして返す
// >>> Unique((new List<long>(new long[]{(long)5L, (long)3L, (long)5L, (long)2L, (long)3L, (long)3L, ... | reworded | transform | HumanEval_34_unique | }
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}))));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_34_unique.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リスト内の最大要素を返す。
// >>> MaxElement((new List<long>(new long[]{(long)1L, (long)2L, (long)3L})))
// (3L)
// >>> MaxElem... | reworded | transform | HumanEval_35_max_element | }
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})... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_35_max_element.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられたn未満の整数の中で、11または13で割り切れる数の中に'7'という数字が何回現れるかを返す
// >>> FizzBuzz((50L))
// (0L)
// >>> FizzBuzz((78L))
// (2... | reworded | transform | HumanEval_36_fizz_buzz | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_36_fizz_buzz.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数はリスト l を受け取り、l' を返す。l'は、インデックスが奇数の
// ときは l と同じで、インデックスが偶数のときはソートされている。
// >>> SortEven((new List<long>(new long[]... | reworded | transform | HumanEval_37_sort_even | }
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,... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_37_sort_even.py | cs |
[
"\n }\n"
] | 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 はフィボナッチ数で、かつ素数であるn番目の数を返す。
// >>> PrimeFib((1L))
// (2L)
// >>> PrimeFib((2L))
// (3L)
// >>> Pr... | reworded | transform | HumanEval_39_prime_fib | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_39_prime_fib.py | cs |
[
"\n }\n"
] | 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 は整数のリストを引数に取り、
// リストの中に和が0になる3つの要素があればtrueを、
// そうでなければfalseを返す。
// >>> TriplesSumToZero((new... | reworded | transform | HumanEval_40_triples_sum_to_zero | }
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(... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_40_triples_sum_to_zero.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 完全な直線で無限に長い道路を想像してほしい。
// n台の車が左から右に向かって走っている。同時に、別のn台の車が
// 右から左に向かって走っている。この2組の車は、最初は互いに非
// 常に離れている。すべての車は同じ速度で... | reworded | transform | HumanEval_41_car_race_collision | }
public static void Main(string[] args) {
Debug.Assert(CarRaceCollision((2L)) == (4L));
Debug.Assert(CarRaceCollision((3L)) == (9L));
Debug.Assert(CarRaceCollision((4L)) == (16L));
Debug.Assert(CarRaceCollision((8L)) == (64L));
Debug.Assert(CarRaceCollision((10L)) == (100L));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_41_car_race_collision.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 要素を1ずつ増やしたリストを返す。
// >>> IncrList((new List<long>(new long[]{(long)1L, (long)2L, (long)3L})))
// (new List<long>(new l... | reworded | transform | HumanEval_42_incr_list | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_42_incr_list.py | cs |
[
"\n }\n"
] | 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 は整数のリストを引数にとる。
// リストの中に2つの要素の和がゼロになる要素があればtrueを、
// そうでなければfalseを返す。
// >>> PairsSumToZero((new... | reworded | transform | HumanEval_43_pairs_sum_to_zero | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_43_pairs_sum_to_zero.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 引数xの基数をbaseに変換する。
// 返り値は変換後の文字列表現である。
// 基数は10未満である。
// >>> ChangeBase((8L), (3L))
// ("22")
// >>> Chang... | reworded | transform | HumanEval_44_change_base | }
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(... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_44_change_base.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 三角形の一辺の長さと高さが与えられたとき、面積を返す。
// >>> TriangleArea((5L), (3L))
// (7.5f)
public static float TriangleArea(long a, lon... | reworded | transform | HumanEval_45_triangle_area | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_45_triangle_area.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// fib4数列はフィボナッチ数列に似た数列で、次のように定義される:
// fib4(0) -> 0
// fib4(1) -> 0
// fib4(2) -> 2
// fib4(3) -> 0
// fib4(... | reworded | transform | HumanEval_46_fib4 | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_46_fib4.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リスト l の要素の中央値を返す。
// >>> Median((new List<long>(new long[]{(long)3L, (long)1L, (long)2L, (long)4L, (long)5L})))
// (fl... | reworded | transform | HumanEval_47_median | }
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(... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_47_median.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた文字列が回文かどうかを判定する
// >>> IsPalindrome((""))
// (true)
// >>> IsPalindrome(("aba"))
// (true)
// >>> IsP... | reworded | transform | HumanEval_48_is_palindrome | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_48_is_palindrome.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2^n を p で割ったモジュロを返す。計算精度に注意。
// >>> Modp((3L), (5L))
// (3L)
// >>> Modp((1101L), (101L))
// (2L)
// >>> M... | reworded | transform | HumanEval_49_modp | }
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)) ==... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_49_modp.py | cs |
[
"\n }\n"
] | 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は文字列を引数に取り、母音を除いた文字列を返す関数である。
// >>> RemoveVowels((""))
// ("")
// >>> RemoveVowels(("abcdef"))
/... | reworded | transform | HumanEval_51_remove_vowels | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_51_remove_vowels.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リスト l 内の全ての数値が閾値 t 未満の場合、trueを返す。
// >>> BelowThreshold((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)10L... | reworded | transform | HumanEval_52_below_threshold | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_52_below_threshold.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2つの数xとyを足す
// >>> Add((2L), (3L))
// (5L)
// >>> Add((5L), (7L))
// (12L)
public static long Add(long x, l... | reworded | transform | HumanEval_53_add | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_53_add.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2つの単語が同じ文字セットから構成されるかどうか判定する。
// >>> SameChars(("eabcdzzzz"), ("dddzzzzzzzddeddabc"))
// (true)
// >>> SameChars((... | reworded | transform | HumanEval_54_same_chars | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_54_same_chars.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// n番目のフィボナッチ数を返す。
// >>> Fib((10L))
// (55L)
// >>> Fib((1L))
// (1L)
// >>> Fib((8L))
// (21L)
publ... | reworded | transform | HumanEval_55_fib | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_55_fib.py | cs |
[
"\n }\n"
] | 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は"<"と">"の文字列である。
// すべての開き括弧が対応する閉じ括弧を持つ場合、trueを返す。
// >>> CorrectBracketing(("<"))
// (false)
// >>... | reworded | transform | HumanEval_56_correct_bracketing | }
public static void Main(string[] args) {
Debug.Assert(CorrectBracketing(("<>")) == (true));
Debug.Assert(CorrectBracketing(("<<><>>")) == (true));
Debug.Assert(CorrectBracketing(("<><><<><>><>")) == (true));
Debug.Assert(CorrectBracketing(("<><><<<><><>><>><<><><<>>>")) == (true));
Debug.A... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_56_correct_bracketing.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// リストの要素が単調増加または単調減少する場合にtrueを返す。
// >>> Monotonic((new List<long>(new long[]{(long)1L, (long)2L, (long)4L, (long)20L})))
... | reworded | transform | HumanEval_57_monotonic | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_57_monotonic.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2つのリストについて、ユニークな共通要素をソートして返す。
// >>> Common((new List<long>(new long[]{(long)1L, (long)4L, (long)3L, (long)34L, (long)653L... | reworded | transform | HumanEval_58_common | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_58_common.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// nの最大となる素因数を返す。ただし、 n > 1 を前提とし、素数ではないものとする。
// >>> LargestPrimeFactor((13195L))
// (29L)
// >>> LargestPrimeFactor... | reworded | transform | HumanEval_59_largest_prime_factor | }
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))... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_59_largest_prime_factor.py | cs |
[
"\n }\n"
] | 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は1からnまでの総和を求める関数である。
// >>> SumToN((30L))
// (465L)
// >>> SumToN((100L))
// (5050L)
// >>> SumToN... | reworded | transform | HumanEval_60_sum_to_n | }
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));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_60_sum_to_n.py | cs |
[
"\n }\n"
] | 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は"("と") "からなる文字列である。
// すべての開き括弧が対応する閉じ括弧を持つ場合、trueを返す。
// >>> CorrectBracketing(("("))
// (false)
/... | reworded | transform | HumanEval_61_correct_bracketing | }
public static void Main(string[] args) {
Debug.Assert(CorrectBracketing(("()")) == (true));
Debug.Assert(CorrectBracketing(("(()())")) == (true));
Debug.Assert(CorrectBracketing(("()()(()())()")) == (true));
Debug.Assert(CorrectBracketing(("()()((()()())())(()()(()))")) == (true));
Debug.A... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_61_correct_bracketing.py | cs |
[
"\n }\n"
] | 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は多項式の係数列を表す。
// xs[0] + xs[1] * x + xs[2] * x^2 + ....
// 関数は、この多項式の導関数を同じ形式で返す。
// >>> Derivative((new List<lon... | reworded | transform | HumanEval_62_derivative | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_62_derivative.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// FibFib数列はフィボナッチ数列に似た数列で、以下のように定義される:
// fibfib(0) == 0
// fibfib(1) == 0
// fibfib(2) == 1
// fibfib(n) == fib... | reworded | transform | HumanEval_63_fibfib | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_63_fibfib.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 単語を表す文字列を引数とし、その文字列に含まれる母音の数を返す
// 関数 vowels_count を書きなさい。この場合の母音は'a', 'e', 'i', 'o', 'u'である。
// ここで、与えられた単語の末尾にある場合のみ... | reworded | transform | HumanEval_64_vowels_count | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_64_vowels_count.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数 x の桁を循環シフトする。shift 分だけ桁を右にシフトし、結果を文字列として返す。
// もし、shift > 桁数なら、桁を反転して返す。
// >>> CircularShift((12L), (1L))
// (... | reworded | transform | HumanEval_65_circular_shift | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_65_circular_shift.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// タスク
// 文字列を引数にとり、英大文字のみのASCIIコードの和を返す関数を書く。
// 例:
// >>> Digitsum((""))
// (0L)
// >>> Digitsum(("abAB"))
... | reworded | transform | HumanEval_66_digitSum | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_66_digitSum.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この課題では、果物の入ったカゴに配られたリンゴとオレンジの数を表す文字列が
// 与えられ、このカゴにはリンゴ、オレンジ、マンゴーの果実が入っている。オレンジ
// とリンゴの総数を表す文字列と、かごの中の果物の総数を表す整数が与えられ... | reworded | transform | HumanEval_67_fruit_distribution | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_67_fruit_distribution.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 非負整数のノードを持つ木の枝を表す配列が与えられたとする。あなたの仕事は、
// ノードの1つを抜き取り、それを返すことである。
// 摘出されるノードは、最小偶数値を持つノードでなければならない。
// 同じ最小偶数値を持つノ... | reworded | transform | HumanEval_68_pluck | }
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, ... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_68_pluck.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 正の整数の空でないリストが与えられる。0より大きく、その整数自身の値以上の頻度を
// 持つ最大の整数を返せ。整数の頻度とは、それがリストに現れる回数である。
// のような値が存在しない場合は -1 を返す。
// 例:
... | reworded | transform | HumanEval_69_search | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_69_search.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数のリストが与えられたとき、リストを奇妙な順序で返す。
// 奇妙なソートとは、最小値から始まり、残りの整数の最大値、最小値の順で
// ソートすることである。
// 例:
// >>> StrangeSortList... | reworded | transform | HumanEval_70_strange_sort_list | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_70_strange_sort_list.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 三角形の3辺の長さが与えられた。3辺が有効な三角形を形成していれば、
// 三角形の面積を小数点以下2桁で四捨五入して返す。そうでない場合は-1を
// 返す。
// 任意の2辺の和が3辺より大きいとき、3辺は有効な三角形となる... | reworded | transform | HumanEval_71_triangle_area | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_71_triangle_area.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 物体qが飛べばtrueを、そうでなければfalseを返す関数を書け。
// 物体qはバランスが取れていて(つまり、リストが回文であって)、その要素の和が
// 最大荷重w以下であれば飛ぶ。
// 例:
// >>> Wi... | reworded | transform | HumanEval_72_will_it_fly | }
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})), (... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_72_will_it_fly.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数の配列arrが与えられたとき、その配列を回文配列にするために
// 必要な要素の最小数を求めよ。回文配列とは、前からも後からも同じ
// ようになる配列のことである。1回の変更で、1つの要素を他の任意の
// 要素に変更でき... | reworded | transform | HumanEval_73_smallest_change | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_73_smallest_change.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2つの文字列リストを受け取り、リストの全文字数の合計がもう一方
// のリストより少ないリストを返す関数を書きなさい。
// もし2つのリストの文字数が同じなら、最初のリストを返す。
// 例
// >>> TotalM... | reworded | transform | HumanEval_74_total_match | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_74_total_match.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 与えられた数が3つの素数の掛け算であればtrueを、そうでなければfalseを返す
// 関数を書きなさい。
// 引数 aは100以下を既知としていよい。
// 例:
// >>> IsMultiplyPrime((3... | reworded | transform | HumanEval_75_is_multiply_prime | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_75_is_multiply_prime.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// あなたのタスクは、ある数xがnの単純なべき乗である場合にtrueを、
// それ以外の場合にfalseを返す関数を書くことである。
// xは、n**int=xのとき、nの単純なべき乗である。
// 例えば:
// >>... | reworded | transform | HumanEval_76_is_simple_power | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_76_is_simple_power.py | cs |
[
"\n }\n"
] | 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を受け取り、この整数がある整数の3乗である場合にtrue
// を返す関数を書きなさい。
// 注意:入力は常に処理可能であると仮定してよい。
// 例:
// >>> Iscube((1L))
// (t... | reworded | transform | HumanEval_77_iscube | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_77_iscube.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 16進数の数字を文字列として受け取り、その中に含まれる素数である16進数の桁数を
// カウントする関数を作成するタスクが与えられました。素数とは、1より大きく、
// 2つのより小さい自然数の積でない自然数です。
// 16... | reworded | transform | HumanEval_78_hex_key | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_78_hex_key.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 10進数形式の数値が与えられ、あなたのタスクはそれを2進数形式に変換することである。
// この関数は、文字列を返し、その各文字は2進数を表す。文字列の各文字は'0'か'1'である。
// なお、文字列の最初と最後には'db'という余分... | reworded | transform | HumanEval_79_decimal_to_binary | }
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")));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_79_decimal_to_binary.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// あなたは文字列sが与えられる。
// あなたのタスクは、その文字列が幸せかどうかをチェックすることである。
// 文字列は幸せとは、文字列の長さが少なくとも3以上で、連続する3文字がすべて異なる場合である。
// 例えば:
... | reworded | transform | HumanEval_80_is_happy | }
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")) == ... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_80_is_happy.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 学期最終週、教師は生徒に成績をつけなければならない。教師は独自のアルゴリズムで採点している。
// 問題は、彼女が成績評価に使ったコードを紛失してしまったことです。
// 彼女は何人かの生徒のGPAのリストをあなたに渡したので、あなたは... | reworded | transform | HumanEval_81_numerical_letter_grade | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_81_numerical_letter_grade.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列を受け取り、文字列の長さが素数であればtrueを、そうでなければfalseを返す関数を書く。
// 例
// >>> PrimeLength(("Hello"))
// (true)
// >>> PrimeLen... | reworded | transform | HumanEval_82_prime_length | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_82_prime_length.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 正の整数 n が与えられたとき、n 桁の正の整数で 1 で始まるか
// もしくは終わる数のカウントを返す
public static long StartsOneEnds(long n) {
| reworded | transform | HumanEval_83_starts_one_ends | }
public static void Main(string[] args) {
Debug.Assert(StartsOneEnds((1L)) == (1L));
Debug.Assert(StartsOneEnds((2L)) == (18L));
Debug.Assert(StartsOneEnds((3L)) == (180L));
Debug.Assert(StartsOneEnds((4L)) == (1800L));
Debug.Assert(StartsOneEnds((5L)) == (18000L));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_83_starts_one_ends.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 正の整数 N が与えられた時、その桁の総和を2進数で返す。
// >>> Solve((1000L))
// ("1")
// >>> Solve((150L))
// ("110")
// >>> So... | reworded | transform | HumanEval_84_solve | }
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")));
}
}
| /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_84_solve.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 空でない整数のリストlstが与えられたとき、奇数のインデックスにある偶数の要素を加える。
// 例:
// >>> Add((new List<long>(new long[]{(long)4L, (long)2L, (long)6L,... | reworded | transform | HumanEval_85_add | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_85_add.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列を引数として受け取り、その「順序付けられたバージョン」を返す関数を作成してください。
// 順序付けられたバージョンとは、各単語(空白で区切られた)の文字がASCII値に基づいて昇順に
// 並べ替えられた新しい単語に置き換えられ... | reworded | transform | HumanEval_86_anti_shuffle | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_86_anti_shuffle.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2次元のデータがネストされたリストとして与えられる。これは行列に似ているが、
// 列とは異なり、各行は異なる数の列を含むことができる。
// lstと整数xが与えられたとき、リスト内の整数xを見つけ、各タプルが0から始まる
/... | reworded | transform | HumanEval_87_get_row | }
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<... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_87_get_row.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 非負の整数からなる配列が与えられた場合、配列をソートしたコピーを返してください。
// 配列の最初の要素と最後の要素の和が奇数であれば、配列を昇順(小さい順)にソートします。
// その和が偶数であれば、配列を降順(大きい順)にソートし... | reworded | transform | HumanEval_88_sort_array | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_88_sort_array.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列を引数にとり、アルファベットを回転させて暗号化した
// 文字列を返す関数encryptを作成せよ。
// アルファベットは、文字位置が2を2倍した4文字分だけ後ろにシフトされるように
// 回転する。
// 例:... | reworded | transform | HumanEval_89_encrypt | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_89_encrypt.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数のリストが与えられる。
// リストの2番目に小さい要素を返す関数 next_smallest() を書きなさい。
// そのような要素がない場合は null を返す。
// >>> NextSmallest((new Li... | reworded | transform | HumanEval_90_next_smallest | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_90_next_smallest.py | cs |
[
"\n }\n"
] | 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 "で始まる文のことである。
// 文は'.'、’?’、'!'のいずれかで区切られる。
// 例えば:
/... | reworded | transform | HumanEval_91_is_bored | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_91_is_bored.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 3つの数値を受け取る関数を作る。
// 1つの数値が他の2つの数値の和と等しく、すべての数値が整数である場合にtrueを返す。
// それ以外の場合はfalseを返す。
// 例
// >>> AnyInt((float... | reworded | transform | HumanEval_92_any_int | }
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));... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_92_any_int.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// メッセージを受け取り、すべての文字の大文字と小文字を入れ替え、
// メッセージ中のすべての母音を英語の母音の2つ前に現れる文字に置
// き換えるようにエンコードする関数を書きなさい。
// 文字だけを想定する。
/... | reworded | transform | HumanEval_93_encode | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_93_encode.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 整数のリストが与えらる。
// 最大の素数を求め、その桁数の和を返す必要がある。
// 例:
// >>> Skjkasdkd((new List<long>(new long[]{(long)0L, (long)3L, (lo... | reworded | transform | HumanEval_94_skjkasdkd | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_94_skjkasdkd.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 辞書が与えられたとき、すべてのキーが小文字であればtrueを、
// すべてのキーが大文字の文字列であればfalseを返す。
// 与えられた辞書が空の場合、この関数は false を返す。
// 例:
// >>> C... | reworded | transform | HumanEval_95_check_dict_case | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_95_check_dict_case.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 非負整数を受け取り、素数でnより小さい最初のn個の
// 整数の配列を返す関数を実装せよ。
// 例えば:
// >>> CountUpTo((5L))
// (new List<long>(new long[]{(lo... | reworded | transform | HumanEval_96_count_up_to | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_96_count_up_to.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 2つの整数を受け取り、その1の位の数の積を返す関数を完成させよ。
// 入力は常に有効範囲にあるとする。
// 例:
// >>> Multiply((148L), (412L))
// (16L)
// >>>... | reworded | transform | HumanEval_97_multiply | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_97_multiply.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 文字列 s が与えられたとき、偶数のインデックスに含まれる大文字の母音の数を数える。
// 例えば:
// >>> CountUpper(("aBCdEf"))
// (1L)
// >>> CountUpper(("a... | reworded | transform | HumanEval_98_count_upper | }
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(("... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_98_count_upper.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 数値を表す文字列valueを受け取り、それに最も近い整数を返す関数を作る。
// その数値が2つの整数から等距離にある場合は、ゼロから四捨五入する。
// 例
// >>> ClosestInteger(("10"))
... | reworded | transform | HumanEval_99_closest_integer | }
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));
}
}... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_99_closest_integer.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// 正の整数nが与えられたとき、n段の石の山を作らなければならない。
// 最初の段にはn個の石がある。
// 次の段の石の数は:
// - nが奇数なら次の奇数。
// - nが偶数なら次の偶数。
// 各段の石の... | reworded | transform | HumanEval_100_make_a_pile | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_100_make_a_pile.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// カンマまたは空白で区切られた単語の文字列が与えられる。あなたのタスクは、
// 文字列を単語に分割し、単語の配列を返すことである。
// 例えば:
// >>> WordsString(("Hi, my name is John... | reworded | transform | HumanEval_101_words_string | }
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... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_101_words_string.py | cs |
[
"\n }\n"
] | using System;
using System.Numerics;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
class Problem {
// この関数は2つの正の数xとyを受け取り、範囲[x, y](両端を含む)に含まれる
// 最大の偶数整数を返す。そのような数がない場合、関数は-1を返す。
// 例えば:
// >>> ChooseNum((12L), (15L)... | reworded | transform | HumanEval_102_choose_num | }
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));
... | /work/arjunguha-research-group/arjun/repos/nuprl/MultiPL-E/datasets/../datasets/originals-with-cleaned-doctests/HumanEval_102_choose_num.py | cs |
End of preview. Expand in Data Studio
- Downloads last month
- 5