id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
16,627,245
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
18,660,735
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
97,060,944
kk
Java
array_ops
intermediate
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
61,233,916
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
79,411,899
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
41,321,630
en
Unity
logic_ops
advanced
Write a function that determines if the number 87 is prime in Unity.
public bool IsPrime() { int n = 87; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 87 is prime in Unity. ### Response: public bool IsPrime() { int n = 87; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,729,367
kk
Unity
var_decl
beginner
Unity тілінде 805160 мәнімен data айнымалысын қалай жариялауға болады?
int data = 805160;
### Instruction: Unity тілінде 805160 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 805160;
2,179,357
ru
Java
var_decl
beginner
Как объявить переменную value со значением 122216 в Java?
int value = 122216;
### Instruction: Как объявить переменную value со значением 122216 в Java? ### Response: int value = 122216;
43,224,756
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,773,921
kk
C++
var_decl
beginner
C++ тілінде 162971 мәнімен level айнымалысын қалай жариялауға болады?
int level = 162971;
### Instruction: C++ тілінде 162971 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 162971;
1,559,305
kk
Unity
var_decl
beginner
Unity тілінде 89653 мәнімен score айнымалысын қалай жариялауға болады?
int score = 89653;
### Instruction: Unity тілінде 89653 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 89653;
94,938,001
kk
C#
logic_ops
advanced
C# тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
59,880,624
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
77,181,275
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1961 високосным.
public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1961 високосным. ### Response: public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,241,948
kk
Python
var_decl
beginner
Python тілінде 690861 мәнімен count айнымалысын қалай жариялауға болады?
count = 690861
### Instruction: Python тілінде 690861 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 690861
4,173,392
kk
JavaScript
var_decl
beginner
JavaScript тілінде 649969 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 649969;
### Instruction: JavaScript тілінде 649969 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 649969;
4,993,348
ru
C++
var_decl
beginner
Как объявить переменную result со значением 130475 в C++?
int result = 130475;
### Instruction: Как объявить переменную result со значением 130475 в C++? ### Response: int result = 130475;
22,748,379
en
C#
logic_ops
intermediate
Write logic to check if the year 1951 is a leap year in C#.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1951 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
12,818,915
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,288,995
en
C#
var_decl
beginner
How to declare a variable offset with value 916205 in C#?
int offset = 916205;
### Instruction: How to declare a variable offset with value 916205 in C#? ### Response: int offset = 916205;
215,917
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 3528.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3528));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 3528. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3528));
96,091,006
en
C#
logic_ops
intermediate
Write a function that determines if the number 243 is prime in C#.
public bool IsPrime() { int n = 243; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 243 is prime in C#. ### Response: public bool IsPrime() { int n = 243; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,475,260
en
Python
var_decl
beginner
How to declare a variable buffer with value 331479 in Python?
buffer = 331479
### Instruction: How to declare a variable buffer with value 331479 in Python? ### Response: buffer = 331479
3,246,689
en
C++
var_decl
beginner
How to declare a variable speed with value 737981 in C++?
int speed = 737981;
### Instruction: How to declare a variable speed with value 737981 in C++? ### Response: int speed = 737981;
71,488,453
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
287,218
ru
Java
var_decl
beginner
Как объявить переменную index со значением 921898 в Java?
int index = 921898;
### Instruction: Как объявить переменную index со значением 921898 в Java? ### Response: int index = 921898;
2,878,192
kk
JavaScript
var_decl
beginner
JavaScript тілінде 2161 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 2161;
### Instruction: JavaScript тілінде 2161 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 2161;
3,655,665
kk
JavaScript
var_decl
beginner
JavaScript тілінде 992680 мәнімен x айнымалысын қалай жариялауға болады?
let x = 992680;
### Instruction: JavaScript тілінде 992680 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 992680;
3,443,161
kk
C#
var_decl
beginner
C# тілінде 829147 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 829147;
### Instruction: C# тілінде 829147 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 829147;
75,353,000
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
98,768,726
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
68,073,533
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 293 простым.
function isPrime() { let n = 293; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 293 простым. ### Response: function isPrime() { let n = 293; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
14,392,171
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
36,096,090
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,393,723
ru
C#
var_decl
beginner
Как объявить переменную rate со значением 432148 в C#?
int rate = 432148;
### Instruction: Как объявить переменную rate со значением 432148 в C#? ### Response: int rate = 432148;
73,091
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 5917.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5917)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 5917. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5917)); }
94,014,493
kk
Unity
logic_ops
advanced
Unity тилінде 274 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 274; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 274 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 274; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,418,029
kk
Unity
logic_ops
intermediate
Unity тилінде 142 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 142; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 142 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 142; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,035,014
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 495048 in JavaScript?
let limit = 495048;
### Instruction: How to declare a variable limit with value 495048 in JavaScript? ### Response: let limit = 495048;
71,771
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 7117.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7117));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 7117. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7117));
25,581,320
en
C++
logic_ops
advanced
Write logic to check if the year 2090 is a leap year in C++.
public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2090 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
373,532
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 6887.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6887)); }
### Instruction: Write a function in Unity that calculates the factorial of 6887. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6887)); }
4,361,710
kk
JavaScript
var_decl
beginner
JavaScript тілінде 375924 мәнімен total айнымалысын қалай жариялауға болады?
let total = 375924;
### Instruction: JavaScript тілінде 375924 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 375924;
92,361,123
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
94,167,556
kk
Python
logic_ops
advanced
Python тилінде 351 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 351 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 351 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 351 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,196,671
ru
C#
var_decl
beginner
Как объявить переменную score со значением 89061 в C#?
int score = 89061;
### Instruction: Как объявить переменную score со значением 89061 в C#? ### Response: int score = 89061;
83,629,609
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 19 простым.
public bool IsPrime() { int n = 19; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 19 простым. ### Response: public bool IsPrime() { int n = 19; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,597,792
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1964 високосным.
public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1964 високосным. ### Response: public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,330,934
en
C#
var_decl
beginner
How to declare a variable rate with value 422468 in C#?
int rate = 422468;
### Instruction: How to declare a variable rate with value 422468 in C#? ### Response: int rate = 422468;
45,348,576
kk
C#
logic_ops
advanced
C# тилінде 495 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 495; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 495 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 495; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
639,106
kk
Java
factorial
advanced
Java тілінде 6939 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6939));
### Instruction: Java тілінде 6939 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6939));
94,279,595
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
34,607,997
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
15,000,042
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
60,585,019
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
83,301,318
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 418 простым.
public bool IsPrime() { int n = 418; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 418 простым. ### Response: public bool IsPrime() { int n = 418; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,398,936
kk
JavaScript
var_decl
beginner
JavaScript тілінде 803984 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 803984;
### Instruction: JavaScript тілінде 803984 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 803984;
88,473,687
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
53,501,894
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
94,597,567
en
JavaScript
array_ops
advanced
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
815,230
en
C++
var_decl
beginner
How to declare a variable limit with value 567696 in C++?
int limit = 567696;
### Instruction: How to declare a variable limit with value 567696 in C++? ### Response: int limit = 567696;
1,431,019
kk
C++
var_decl
beginner
C++ тілінде 741796 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 741796;
### Instruction: C++ тілінде 741796 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 741796;
60,214,518
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1951 високосным.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1951 високосным. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,764,175
kk
Unity
logic_ops
intermediate
Unity тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,510,702
ru
C#
var_decl
beginner
Как объявить переменную rate со значением 759807 в C#?
int rate = 759807;
### Instruction: Как объявить переменную rate со значением 759807 в C#? ### Response: int rate = 759807;
4,649,634
kk
Java
var_decl
beginner
Java тілінде 375382 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 375382;
### Instruction: Java тілінде 375382 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 375382;
4,943,425
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 951449 в Unity?
int timer = 951449;
### Instruction: Как объявить переменную timer со значением 951449 в Unity? ### Response: int timer = 951449;
14,284,297
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
55,348,507
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
1,294,312
en
C++
var_decl
beginner
How to declare a variable rate with value 413566 in C++?
int rate = 413566;
### Instruction: How to declare a variable rate with value 413566 in C++? ### Response: int rate = 413566;
395,923
kk
Unity
factorial
advanced
Unity тілінде 5552 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5552)); }
### Instruction: Unity тілінде 5552 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5552)); }
799,352
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 2563.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2563));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 2563. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2563));
78,076,646
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,054,970
kk
C++
var_decl
beginner
C++ тілінде 750178 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 750178;
### Instruction: C++ тілінде 750178 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 750178;
18,247,407
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 292 простым.
public bool IsPrime() { int n = 292; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 292 простым. ### Response: public bool IsPrime() { int n = 292; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
829,644
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 847912 в Unity?
int result = 847912;
### Instruction: Как объявить переменную result со значением 847912 в Unity? ### Response: int result = 847912;
3,133,786
en
C#
var_decl
beginner
How to declare a variable offset with value 777108 in C#?
int offset = 777108;
### Instruction: How to declare a variable offset with value 777108 in C#? ### Response: int offset = 777108;
14,084,230
ru
Java
string_ops
advanced
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
58,758,480
kk
C++
array_ops
advanced
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
90,592,907
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
58,219,699
kk
Unity
logic_ops
intermediate
Unity тилінде 39 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 39; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 39 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 39; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,358,828
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,813,213
en
Python
var_decl
beginner
How to declare a variable amount with value 305027 in Python?
amount = 305027
### Instruction: How to declare a variable amount with value 305027 in Python? ### Response: amount = 305027
11,696,264
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
1,796,645
en
C#
var_decl
beginner
How to declare a variable x with value 763004 in C#?
int x = 763004;
### Instruction: How to declare a variable x with value 763004 in C#? ### Response: int x = 763004;
1,659,046
en
C#
var_decl
beginner
How to declare a variable total with value 694451 in C#?
int total = 694451;
### Instruction: How to declare a variable total with value 694451 in C#? ### Response: int total = 694451;
3,157,101
kk
C++
var_decl
beginner
C++ тілінде 942666 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 942666;
### Instruction: C++ тілінде 942666 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 942666;
4,450,096
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 601048 в Unity?
int level = 601048;
### Instruction: Как объявить переменную level со значением 601048 в Unity? ### Response: int level = 601048;
69,116,449
kk
C#
array_ops
intermediate
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,929,247
en
Python
var_decl
beginner
How to declare a variable result with value 554528 in Python?
result = 554528
### Instruction: How to declare a variable result with value 554528 in Python? ### Response: result = 554528
4,189,520
ru
Python
var_decl
beginner
Как объявить переменную count со значением 984892 в Python?
count = 984892
### Instruction: Как объявить переменную count со значением 984892 в Python? ### Response: count = 984892
2,138,535
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 831870 в JavaScript?
let weight = 831870;
### Instruction: Как объявить переменную weight со значением 831870 в JavaScript? ### Response: let weight = 831870;
4,929,557
kk
C#
var_decl
beginner
C# тілінде 153257 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 153257;
### Instruction: C# тілінде 153257 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 153257;
4,000,897
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 814987 в C++?
int limit = 814987;
### Instruction: Как объявить переменную limit со значением 814987 в C++? ### Response: int limit = 814987;
1,463,234
kk
JavaScript
var_decl
beginner
JavaScript тілінде 967481 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 967481;
### Instruction: JavaScript тілінде 967481 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 967481;
4,550,052
kk
C++
var_decl
beginner
C++ тілінде 375491 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 375491;
### Instruction: C++ тілінде 375491 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 375491;
71,645,660
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
71,993,230
kk
C++
logic_ops
advanced
C++ тилінде 490 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 490; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 490 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 490; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
270,908
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 9487-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9487)); }
### Instruction: Unity тілінде 1-ден 9487-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9487)); }
43,386,105
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();