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
38,478,768
kk
C#
string_ops
advanced
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
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: C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### 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; }
90,766,228
kk
Java
logic_ops
intermediate
Java тилінде 425 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 425; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 425 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 425; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,065,500
ru
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);
60,356,153
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### 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; }
4,059,902
en
JavaScript
var_decl
beginner
How to declare a variable total with value 585640 in JavaScript?
let total = 585640;
### Instruction: How to declare a variable total with value 585640 in JavaScript? ### Response: let total = 585640;
60,646,208
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
46,944,094
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
99,358,389
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
4,862,226
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 509214 в Unity?
int limit = 509214;
### Instruction: Как объявить переменную limit со значением 509214 в Unity? ### Response: int limit = 509214;
41,482,615
ru
Python
string_ops
advanced
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
29,602
en
C++
var_decl
beginner
How to declare a variable score with value 792943 in C++?
int score = 792943;
### Instruction: How to declare a variable score with value 792943 in C++? ### Response: int score = 792943;
13,212,535
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2021 високосным.
def is_leap(): year = 2021 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2021 високосным. ### Response: def is_leap(): year = 2021 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
47,658,083
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; }
59,388,091
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(); }
93,219,929
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; }
98,180,650
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 199 простым.
public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 199 простым. ### Response: public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,999,305
en
C#
var_decl
beginner
How to declare a variable total with value 130991 in C#?
int total = 130991;
### Instruction: How to declare a variable total with value 130991 in C#? ### Response: int total = 130991;
4,123,518
ru
Python
var_decl
beginner
Как объявить переменную health со значением 207779 в Python?
health = 207779
### Instruction: Как объявить переменную health со значением 207779 в Python? ### Response: health = 207779
3,919,205
kk
C#
var_decl
beginner
C# тілінде 676505 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 676505;
### Instruction: C# тілінде 676505 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 676505;
51,775,874
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2098 високосным.
def is_leap(): year = 2098 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2098 високосным. ### Response: def is_leap(): year = 2098 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
110,048
kk
C#
factorial
advanced
C# тілінде 9753 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9753));
### Instruction: C# тілінде 9753 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9753));
74,086,710
ru
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); }
3,821,707
en
Unity
var_decl
beginner
How to declare a variable speed with value 487358 in Unity?
int speed = 487358;
### Instruction: How to declare a variable speed with value 487358 in Unity? ### Response: int speed = 487358;
4,957,746
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 474698 in JavaScript?
let amount = 474698;
### Instruction: How to declare a variable amount with value 474698 in JavaScript? ### Response: let amount = 474698;
48,384,725
ru
C#
array_ops
advanced
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
17,988,032
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
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 C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,984,112
en
C++
var_decl
beginner
How to declare a variable amount with value 102618 in C++?
int amount = 102618;
### Instruction: How to declare a variable amount with value 102618 in C++? ### Response: int amount = 102618;
79,851,539
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1981 високосным.
public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1981 високосным. ### Response: public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
97,005
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 8535.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8535))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 8535. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8535))
29,274,410
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
79,954,539
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
55,450,434
en
C++
logic_ops
advanced
Write logic to check if the year 1947 is a leap year in C++.
public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1947 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
79,949,613
en
C++
string_ops
intermediate
Write a function that counts vowels in a text in C++.
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 C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
56,924,393
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; }
26,439,099
en
Unity
logic_ops
intermediate
Write logic to check if the year 2018 is a leap year in Unity.
public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2018 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,590,034
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 55619 in JavaScript?
let timer = 55619;
### Instruction: How to declare a variable timer with value 55619 in JavaScript? ### Response: let timer = 55619;
67,775,632
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in Unity.
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: Write a function that filters only even numbers from a list in Unity. ### 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; }
451,262
en
JavaScript
var_decl
beginner
How to declare a variable size with value 607125 in JavaScript?
let size = 607125;
### Instruction: How to declare a variable size with value 607125 in JavaScript? ### Response: let size = 607125;
13,679,385
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1971 високосным.
public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1971 високосным. ### Response: public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
414,147
kk
C++
var_decl
beginner
C++ тілінде 907699 мәнімен total айнымалысын қалай жариялауға болады?
int total = 907699;
### Instruction: C++ тілінде 907699 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 907699;
2,269,825
kk
JavaScript
var_decl
beginner
JavaScript тілінде 55236 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 55236;
### Instruction: JavaScript тілінде 55236 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 55236;
373,871
ru
Python
var_decl
beginner
Как объявить переменную score со значением 307430 в Python?
score = 307430
### Instruction: Как объявить переменную score со значением 307430 в Python? ### Response: score = 307430
31,950,709
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; }
62,118,452
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
90,510,965
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(); }
97,730,670
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
90,744,652
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
1,033,429
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 2391.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2391));
### Instruction: Write a function in C# that sums numbers from 1 to 2391. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2391));
16,876,103
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### 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; }
14,694,118
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; }
89,001,250
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### 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; }
377,817
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 5547.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5547) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 5547. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(5547) << std::endl;
2,658,196
ru
Java
var_decl
beginner
Как объявить переменную score со значением 321486 в Java?
int score = 321486;
### Instruction: Как объявить переменную score со значением 321486 в Java? ### Response: int score = 321486;
81,435,592
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,895,444
ru
C#
var_decl
beginner
Как объявить переменную index со значением 959282 в C#?
int index = 959282;
### Instruction: Как объявить переменную index со значением 959282 в C#? ### Response: int index = 959282;
54,269,257
kk
C#
string_ops
advanced
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,360,273
kk
Unity
var_decl
beginner
Unity тілінде 171743 мәнімен value айнымалысын қалай жариялауға болады?
int value = 171743;
### Instruction: Unity тілінде 171743 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 171743;
20,504,127
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2055 високосным.
public bool IsLeap() { int y = 2055; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2055 високосным. ### Response: public bool IsLeap() { int y = 2055; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,719,719
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 396789 в JavaScript?
let y = 396789;
### Instruction: Как объявить переменную y со значением 396789 в JavaScript? ### Response: let y = 396789;
31,882,227
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,791,416
en
JavaScript
var_decl
beginner
How to declare a variable count with value 550832 in JavaScript?
let count = 550832;
### Instruction: How to declare a variable count with value 550832 in JavaScript? ### Response: let count = 550832;
80,067,533
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### 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; }
351,700
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 4560.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4560));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 4560. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4560));
21,602,993
kk
Java
array_ops
intermediate
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; }
290,560
en
JavaScript
var_decl
beginner
How to declare a variable value with value 798147 in JavaScript?
let value = 798147;
### Instruction: How to declare a variable value with value 798147 in JavaScript? ### Response: let value = 798147;
24,336,258
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
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: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### 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; }
21,815,840
kk
Unity
array_ops
intermediate
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
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: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### 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; }
775,299
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 861931 в Python?
weight = 861931
### Instruction: Как объявить переменную weight со значением 861931 в Python? ### Response: weight = 861931
11,082,384
en
Python
logic_ops
intermediate
Write logic to check if the year 1910 is a leap year in Python.
def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1910 is a leap year in Python. ### Response: def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,182,077
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 533148 в JavaScript?
let index = 533148;
### Instruction: Как объявить переменную index со значением 533148 в JavaScript? ### Response: let index = 533148;
3,908,529
en
C#
var_decl
beginner
How to declare a variable amount with value 800464 in C#?
int amount = 800464;
### Instruction: How to declare a variable amount with value 800464 in C#? ### Response: int amount = 800464;
31,233,254
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
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 Unity. ### 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; }
29,324,981
kk
C++
array_ops
advanced
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,229,367
kk
Java
var_decl
beginner
Java тілінде 486372 мәнімен health айнымалысын қалай жариялауға болады?
int health = 486372;
### Instruction: Java тілінде 486372 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 486372;
86,918,833
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]
50,752,149
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
89,955,377
en
C++
logic_ops
advanced
Write a function that determines if the number 405 is prime in C++.
public bool IsPrime() { int n = 405; 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 405 is prime in C++. ### Response: public bool IsPrime() { int n = 405; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
22,299,806
kk
Python
logic_ops
advanced
Python тилінде 1979 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1979 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1979 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1979 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
16,811,966
en
Java
logic_ops
advanced
Write a function that determines if the number 366 is prime in Java.
public bool IsPrime() { int n = 366; 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 366 is prime in Java. ### Response: public bool IsPrime() { int n = 366; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
45,790,590
kk
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; }
37,457,883
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
95,741,980
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 459 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 459; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 459 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 459; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,249,369
en
Python
var_decl
beginner
How to declare a variable amount with value 104878 in Python?
amount = 104878
### Instruction: How to declare a variable amount with value 104878 in Python? ### Response: amount = 104878
3,465,513
kk
Java
var_decl
beginner
Java тілінде 826479 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 826479;
### Instruction: Java тілінде 826479 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 826479;
66,586,053
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 149 простым.
public bool IsPrime() { int n = 149; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 149 простым. ### Response: public bool IsPrime() { int n = 149; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,660,411
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
3,990,236
ru
Java
var_decl
beginner
Как объявить переменную level со значением 490813 в Java?
int level = 490813;
### Instruction: Как объявить переменную level со значением 490813 в Java? ### Response: int level = 490813;
72,721,125
en
Java
array_ops
intermediate
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; }
94,385
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 3019.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3019))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 3019. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3019))
1,039,169
en
Python
var_decl
beginner
How to declare a variable total with value 315317 in Python?
total = 315317
### Instruction: How to declare a variable total with value 315317 in Python? ### Response: total = 315317
73,381,745
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
47,084,436
en
Java
logic_ops
intermediate
Write a function that determines if the number 289 is prime in Java.
public bool IsPrime() { int n = 289; 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 289 is prime in Java. ### Response: public bool IsPrime() { int n = 289; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,187,780
ru
C#
string_ops
advanced
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,681,072
kk
C++
var_decl
beginner
C++ тілінде 394204 мәнімен level айнымалысын қалай жариялауға болады?
int level = 394204;
### Instruction: C++ тілінде 394204 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 394204;
76,919,005
ru
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);
1,079,227
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 669.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(669) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 669. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(669) << std::endl;
482,394
kk
Java
sum_n
intermediate
Java тілінде 1-ден 4657-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4657));
### Instruction: Java тілінде 1-ден 4657-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4657));
3,079,021
en
Java
var_decl
beginner
How to declare a variable index with value 726684 in Java?
int index = 726684;
### Instruction: How to declare a variable index with value 726684 in Java? ### Response: int index = 726684;
29,658,402
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
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: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### 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; }
45,580,296
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
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: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### 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; }