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 |
|---|---|---|---|---|---|---|---|
1,971,283 | ru | Java | var_decl | beginner | Как объявить переменную limit со значением 578733 в Java? | int limit = 578733; | ### Instruction:
Как объявить переменную limit со значением 578733 в Java?
### Response:
int limit = 578733; |
2,353,865 | en | Unity | var_decl | beginner | How to declare a variable timer with value 122224 in Unity? | int timer = 122224; | ### Instruction:
How to declare a variable timer with value 122224 in Unity?
### Response:
int timer = 122224; |
63,639,922 | en | Python | logic_ops | advanced | Write a function that determines if the number 444 is prime in Python. | def is_prime():
n = 444
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Write a function that determines if the number 444 is prime in Python.
### Response:
def is_prime():
n = 444
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
79,251,312 | kk | C# | array_ops | intermediate | 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;
} |
20,152 | kk | Python | factorial | advanced | Python тілінде 657 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(657)) | ### Instruction:
Python тілінде 657 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(657)) |
4,219 | ru | Unity | func_def | intermediate | Напиши функцию validate в Unity, которая принимает y и удваивает его. | int validate(int y) {
return y * 2;
} | ### Instruction:
Напиши функцию validate в Unity, которая принимает y и удваивает его.
### Response:
int validate(int y) {
return y * 2;
} |
83,756,887 | 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;
} |
4,939,239 | kk | Unity | var_decl | beginner | Unity тілінде 728711 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 728711; | ### Instruction:
Unity тілінде 728711 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 728711; |
503,336 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 1813-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1813)); | ### Instruction:
Java тілінде 1-ден 1813-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1813)); |
4,492,926 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 266375 в C++? | int timer = 266375; | ### Instruction:
Как объявить переменную timer со значением 266375 в C++?
### Response:
int timer = 266375; |
38,710,173 | 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;
} |
55,583,412 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 281 is prime in Unity. | public bool IsPrime() {
int n = 281;
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 281 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 281;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
98,591,292 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 164 простым. | def is_prime():
n = 164
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 164 простым.
### Response:
def is_prime():
n = 164
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
72,566,259 | 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);
} |
16,924,032 | ru | 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;
} |
49,656,763 | ru | C# | string_ops | advanced | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,409,100 | en | Python | var_decl | beginner | How to declare a variable result with value 927301 in Python? | result = 927301 | ### Instruction:
How to declare a variable result with value 927301 in Python?
### Response:
result = 927301 |
61,336,903 | en | C# | logic_ops | advanced | Write a function that determines if the number 489 is prime in C#. | public bool IsPrime() {
int n = 489;
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 489 is prime in C#.
### Response:
public bool IsPrime() {
int n = 489;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,208,038 | kk | Java | var_decl | beginner | Java тілінде 623314 мәнімен y айнымалысын қалай жариялауға болады? | int y = 623314; | ### Instruction:
Java тілінде 623314 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 623314; |
73,453,066 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 2083 високосным. | def is_leap():
year = 2083
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2083 високосным.
### Response:
def is_leap():
year = 2083
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
83,263,872 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
35,337,572 | 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;
} |
1,350,164 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 12598 в Java? | int data = 12598; | ### Instruction:
Как объявить переменную data со значением 12598 в Java?
### Response:
int data = 12598; |
68,875,315 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1941 високосным. | def is_leap():
year = 1941
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1941 високосным.
### Response:
def is_leap():
year = 1941
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
4,711,194 | en | Java | var_decl | beginner | How to declare a variable weight with value 318012 in Java? | int weight = 318012; | ### Instruction:
How to declare a variable weight with value 318012 in Java?
### Response:
int weight = 318012; |
739,263 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 8811. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8811));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 8811.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8811));
} |
3,188,952 | en | Java | var_decl | beginner | How to declare a variable data with value 405391 in Java? | int data = 405391; | ### Instruction:
How to declare a variable data with value 405391 in Java?
### Response:
int data = 405391; |
70,979,229 | ru | Unity | string_ops | intermediate | Напишите на 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;
} |
1,955,458 | en | Python | var_decl | beginner | How to declare a variable timer with value 719061 in Python? | timer = 719061 | ### Instruction:
How to declare a variable timer with value 719061 in Python?
### Response:
timer = 719061 |
31,442,757 | 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;
} |
88,099,450 | 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();
} |
1,198,468 | kk | Unity | var_decl | beginner | Unity тілінде 404085 мәнімен value айнымалысын қалай жариялауға болады? | int value = 404085; | ### Instruction:
Unity тілінде 404085 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 404085; |
18,811,327 | kk | C# | string_ops | intermediate | C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
71,704,354 | en | Python | array_ops | intermediate | 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) |
51,339,103 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
97,777,553 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 319 простым. | public bool IsPrime() {
int n = 319;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 319 простым.
### Response:
public bool IsPrime() {
int n = 319;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
80,416,091 | 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;
} |
90,345,814 | kk | C++ | string_ops | intermediate | 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;
} |
580,021 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 3295-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3295)); | ### Instruction:
JavaScript тілінде 1-ден 3295-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3295)); |
46,366,498 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2001 високосным. | public bool IsLeap() {
int y = 2001;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2001 високосным.
### Response:
public bool IsLeap() {
int y = 2001;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,726,633 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
98,833,042 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 343 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 343;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 343 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 343;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
54,997,599 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
49,660,153 | ru | 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,325,876 | kk | Java | var_decl | beginner | Java тілінде 279008 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 279008; | ### Instruction:
Java тілінде 279008 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 279008; |
68,568,190 | 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;
} |
635,695 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 1347. | 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(1347) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 1347.
### 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(1347) << std::endl; |
94,391,593 | 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);
} |
57,581,127 | kk | Java | string_ops | intermediate | Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
46,076,204 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
73,336,883 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
76,825,464 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2073 високосным. | public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2073 високосным.
### Response:
public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
397,426 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 7802. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7802)); | ### Instruction:
Write a function in Java that calculates the factorial of 7802.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7802)); |
82,945,700 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1989;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1989;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,621,240 | ru | Python | var_decl | beginner | Как объявить переменную x со значением 584775 в Python? | x = 584775 | ### Instruction:
Как объявить переменную x со значением 584775 в Python?
### Response:
x = 584775 |
2,182,318 | en | Java | var_decl | beginner | How to declare a variable health with value 921312 in Java? | int health = 921312; | ### Instruction:
How to declare a variable health with value 921312 in Java?
### Response:
int health = 921312; |
834,835 | en | Python | var_decl | beginner | How to declare a variable y with value 875168 in Python? | y = 875168 | ### Instruction:
How to declare a variable y with value 875168 in Python?
### Response:
y = 875168 |
90,224,696 | kk | C++ | logic_ops | intermediate | C++ тилінде 363 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 363;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 363 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 363;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
52,694,231 | ru | 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;
} |
216,272 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 5257. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(5257)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 5257.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(5257)); |
2,173,452 | kk | Unity | var_decl | beginner | Unity тілінде 997146 мәнімен x айнымалысын қалай жариялауға болады? | int x = 997146; | ### Instruction:
Unity тілінде 997146 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 997146; |
93,191,675 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
83,165,953 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Unity функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,994,810 | kk | Java | var_decl | beginner | Java тілінде 879441 мәнімен level айнымалысын қалай жариялауға болады? | int level = 879441; | ### Instruction:
Java тілінде 879441 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 879441; |
13,687,674 | kk | Java | logic_ops | intermediate | Java тилінде 1996 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1996;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1996 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1996;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,799,657 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 715235 в C++? | int health = 715235; | ### Instruction:
Как объявить переменную health со значением 715235 в C++?
### Response:
int health = 715235; |
908,454 | kk | C++ | var_decl | beginner | C++ тілінде 939213 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 939213; | ### Instruction:
C++ тілінде 939213 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 939213; |
32,747,173 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
3,046,592 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 295086 в Java? | int count = 295086; | ### Instruction:
Как объявить переменную count со значением 295086 в Java?
### Response:
int count = 295086; |
126,966 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 8327-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8327));
} | ### Instruction:
Unity тілінде 1-ден 8327-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8327));
} |
2,708 | kk | Unity | factorial | advanced | Unity тілінде 6734 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6734));
} | ### Instruction:
Unity тілінде 6734 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6734));
} |
97,328,610 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 107 простым. | def is_prime():
n = 107
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 107 простым.
### Response:
def is_prime():
n = 107
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
57,518,964 | 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);
} |
3,540,206 | kk | Unity | var_decl | beginner | Unity тілінде 204686 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 204686; | ### Instruction:
Unity тілінде 204686 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 204686; |
34,978,154 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1969 високосным. | public bool IsLeap() {
int y = 1969;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1969 високосным.
### Response:
public bool IsLeap() {
int y = 1969;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,415,326 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
78,805,603 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
1,128,317 | kk | Python | var_decl | beginner | Python тілінде 998135 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 998135 | ### Instruction:
Python тілінде 998135 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 998135 |
23,576,493 | en | Java | logic_ops | advanced | Write logic to check if the year 1985 is a leap year in Java. | public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1985 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
572,587 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 4310. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4310)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 4310.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4310)) |
77,845,492 | 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;
} |
53,563,063 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
79,791,234 | 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;
} |
70,537,995 | kk | Python | string_ops | advanced | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
65,545,252 | 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();
} |
70,294,200 | en | C++ | string_ops | advanced | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
412,189 | kk | Unity | factorial | advanced | Unity тілінде 4372 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4372));
} | ### Instruction:
Unity тілінде 4372 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4372));
} |
2,963,710 | ru | C# | var_decl | beginner | Как объявить переменную buffer со значением 830876 в C#? | int buffer = 830876; | ### Instruction:
Как объявить переменную buffer со значением 830876 в C#?
### Response:
int buffer = 830876; |
4,500,235 | kk | C# | var_decl | beginner | C# тілінде 460404 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 460404; | ### Instruction:
C# тілінде 460404 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 460404; |
3,083,395 | ru | Python | var_decl | beginner | Как объявить переменную rate со значением 57055 в Python? | rate = 57055 | ### Instruction:
Как объявить переменную rate со значением 57055 в Python?
### Response:
rate = 57055 |
22,346,179 | en | Java | array_ops | advanced | 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,279,385 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 27448 в Unity? | int count = 27448; | ### Instruction:
Как объявить переменную count со значением 27448 в Unity?
### Response:
int count = 27448; |
710,929 | en | Java | var_decl | beginner | How to declare a variable speed with value 600110 in Java? | int speed = 600110; | ### Instruction:
How to declare a variable speed with value 600110 in Java?
### Response:
int speed = 600110; |
65,170,404 | kk | Python | string_ops | advanced | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
3,888,276 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 653848 in JavaScript? | let count = 653848; | ### Instruction:
How to declare a variable count with value 653848 in JavaScript?
### Response:
let count = 653848; |
1,286,759 | en | Java | var_decl | beginner | How to declare a variable timer with value 912036 in Java? | int timer = 912036; | ### Instruction:
How to declare a variable timer with value 912036 in Java?
### Response:
int timer = 912036; |
65,574,178 | ru | C++ | array_ops | intermediate | Напишите на 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;
} |
88,545,046 | kk | Unity | array_ops | intermediate | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
16,969,896 | kk | C++ | string_ops | intermediate | 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,984,219 | ru | JavaScript | var_decl | beginner | Как объявить переменную speed со значением 150293 в JavaScript? | let speed = 150293; | ### Instruction:
Как объявить переменную speed со значением 150293 в JavaScript?
### Response:
let speed = 150293; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.