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 |
|---|---|---|---|---|---|---|---|
2,515,728 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 929829 в Unity? | int data = 929829; | ### Instruction:
Как объявить переменную data со значением 929829 в Unity?
### Response:
int data = 929829; |
86,956,814 | kk | Python | logic_ops | intermediate | Python тилінде 2063 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2063
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2063 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2063
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
5,288 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 1902-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1902)); | ### Instruction:
JavaScript тілінде 1-ден 1902-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1902)); |
45,507,811 | en | Unity | array_ops | advanced | 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);
} |
61,749,242 | 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;
} |
99,436,547 | kk | Java | array_ops | advanced | 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;
} |
30,309,567 | 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();
} |
741,533 | en | Unity | var_decl | beginner | How to declare a variable count with value 165811 in Unity? | int count = 165811; | ### Instruction:
How to declare a variable count with value 165811 in Unity?
### Response:
int count = 165811; |
37,378,952 | 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;
} |
11,352,763 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 267 is prime in Unity. | public bool IsPrime() {
int n = 267;
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 267 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 267;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,683,599 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 980952 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 980952; | ### Instruction:
JavaScript тілінде 980952 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 980952; |
30,099,926 | en | Python | logic_ops | advanced | Write logic to check if the year 1912 is a leap year in Python. | def is_leap():
year = 1912
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1912 is a leap year in Python.
### Response:
def is_leap():
year = 1912
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,368,663 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 919654 в Java? | int x = 919654; | ### Instruction:
Как объявить переменную x со значением 919654 в Java?
### Response:
int x = 919654; |
931,905 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 269318 мәнімен data айнымалысын қалай жариялауға болады? | let data = 269318; | ### Instruction:
JavaScript тілінде 269318 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
let data = 269318; |
73,977,310 | 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,713,906 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 32016 в Python? | limit = 32016 | ### Instruction:
Как объявить переменную limit со значением 32016 в Python?
### Response:
limit = 32016 |
1,954,480 | kk | C++ | var_decl | beginner | C++ тілінде 843 мәнімен level айнымалысын қалай жариялауға болады? | int level = 843; | ### Instruction:
C++ тілінде 843 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 843; |
52,980,338 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 322 is prime in C++. | public bool IsPrime() {
int n = 322;
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 322 is prime in C++.
### Response:
public bool IsPrime() {
int n = 322;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,203,819 | ru | C# | var_decl | beginner | Как объявить переменную size со значением 838219 в C#? | int size = 838219; | ### Instruction:
Как объявить переменную size со значением 838219 в C#?
### Response:
int size = 838219; |
55,012,653 | en | Python | string_ops | advanced | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
91,632,469 | en | JavaScript | array_ops | advanced | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
44,341,289 | kk | C++ | logic_ops | intermediate | C++ тилінде 445 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 445;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 445 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 445;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
51,194,119 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
4,556,959 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 133873 в C++? | int timer = 133873; | ### Instruction:
Как объявить переменную timer со значением 133873 в C++?
### Response:
int timer = 133873; |
59,720,469 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 24 простым. | public bool IsPrime() {
int n = 24;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 24 простым.
### Response:
public bool IsPrime() {
int n = 24;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
23,514,656 | kk | C# | logic_ops | advanced | C# тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2094;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2094 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2094;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,869,289 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 393716 в Unity? | int value = 393716; | ### Instruction:
Как объявить переменную value со значением 393716 в Unity?
### Response:
int value = 393716; |
4,175,798 | kk | Java | var_decl | beginner | Java тілінде 770078 мәнімен size айнымалысын қалай жариялауға болады? | int size = 770078; | ### Instruction:
Java тілінде 770078 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 770078; |
63,583,958 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 488 is prime in C++. | public bool IsPrime() {
int n = 488;
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 488 is prime in C++.
### Response:
public bool IsPrime() {
int n = 488;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,268,848 | en | C# | var_decl | beginner | How to declare a variable timer with value 794613 in C#? | int timer = 794613; | ### Instruction:
How to declare a variable timer with value 794613 in C#?
### Response:
int timer = 794613; |
71,071,516 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
2,143,380 | kk | C# | var_decl | beginner | C# тілінде 355264 мәнімен result айнымалысын қалай жариялауға болады? | int result = 355264; | ### Instruction:
C# тілінде 355264 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 355264; |
4,041,757 | ru | Unity | var_decl | beginner | Как объявить переменную weight со значением 957466 в Unity? | int weight = 957466; | ### Instruction:
Как объявить переменную weight со значением 957466 в Unity?
### Response:
int weight = 957466; |
566,426 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 9475. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9475)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 9475.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9475)) |
61,061,143 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 81 is prime in Unity. | public bool IsPrime() {
int n = 81;
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 81 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 81;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
60,785 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 5717. | 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(5717) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 5717.
### 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(5717) << std::endl; |
24,762,345 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
40,331,868 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
77,466,883 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
68,760,125 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1971 is a leap year in Unity. | public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1971 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,938,551 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 100008 in JavaScript? | let total = 100008; | ### Instruction:
How to declare a variable total with value 100008 in JavaScript?
### Response:
let total = 100008; |
3,424,388 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 562915 в C++? | int amount = 562915; | ### Instruction:
Как объявить переменную amount со значением 562915 в C++?
### Response:
int amount = 562915; |
56,771,873 | 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;
} |
79,275,380 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
1,540,929 | en | Unity | var_decl | beginner | How to declare a variable health with value 866683 in Unity? | int health = 866683; | ### Instruction:
How to declare a variable health with value 866683 in Unity?
### Response:
int health = 866683; |
75,386,840 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
790,694 | en | C# | var_decl | beginner | How to declare a variable level with value 679611 in C#? | int level = 679611; | ### Instruction:
How to declare a variable level with value 679611 in C#?
### Response:
int level = 679611; |
1,563,643 | en | C# | var_decl | beginner | How to declare a variable data with value 880513 in C#? | int data = 880513; | ### Instruction:
How to declare a variable data with value 880513 in C#?
### Response:
int data = 880513; |
41,195,627 | en | JavaScript | string_ops | advanced | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
438,213 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 2112. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2112)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 2112.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2112)) |
3,294,537 | en | Java | var_decl | beginner | How to declare a variable x with value 693533 in Java? | int x = 693533; | ### Instruction:
How to declare a variable x with value 693533 in Java?
### Response:
int x = 693533; |
3,019,961 | en | C# | var_decl | beginner | How to declare a variable index with value 892263 in C#? | int index = 892263; | ### Instruction:
How to declare a variable index with value 892263 in C#?
### Response:
int index = 892263; |
74,153,369 | ru | 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;
} |
4,674,170 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 774865 мәнімен x айнымалысын қалай жариялауға болады? | let x = 774865; | ### Instruction:
JavaScript тілінде 774865 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 774865; |
36,855,096 | en | Unity | string_ops | advanced | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,375,486 | en | Java | var_decl | beginner | How to declare a variable x with value 288844 in Java? | int x = 288844; | ### Instruction:
How to declare a variable x with value 288844 in Java?
### Response:
int x = 288844; |
13,331,935 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
415,416 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 8184. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8184)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 8184.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8184)); |
1,620,590 | en | C# | var_decl | beginner | How to declare a variable offset with value 341141 in C#? | int offset = 341141; | ### Instruction:
How to declare a variable offset with value 341141 in C#?
### Response:
int offset = 341141; |
3,439,225 | kk | C++ | var_decl | beginner | C++ тілінде 334736 мәнімен size айнымалысын қалай жариялауға болады? | int size = 334736; | ### Instruction:
C++ тілінде 334736 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 334736; |
41,555,306 | 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();
} |
4,187,780 | en | C# | var_decl | beginner | How to declare a variable count with value 393186 in C#? | int count = 393186; | ### Instruction:
How to declare a variable count with value 393186 in C#?
### Response:
int count = 393186; |
92,539,388 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 358 простым. | def is_prime():
n = 358
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 358 простым.
### Response:
def is_prime():
n = 358
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
29,782 | en | Python | var_decl | beginner | How to declare a variable result with value 457806 in Python? | result = 457806 | ### Instruction:
How to declare a variable result with value 457806 in Python?
### Response:
result = 457806 |
348,481 | kk | Python | var_decl | beginner | Python тілінде 889057 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 889057 | ### Instruction:
Python тілінде 889057 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 889057 |
1,607,814 | kk | C# | var_decl | beginner | C# тілінде 762184 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 762184; | ### Instruction:
C# тілінде 762184 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 762184; |
82,547,658 | en | Python | logic_ops | intermediate | Write a function that determines if the number 438 is prime in Python. | def is_prime():
n = 438
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 438 is prime in Python.
### Response:
def is_prime():
n = 438
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
240,520 | en | Python | var_decl | beginner | How to declare a variable speed with value 220422 in Python? | speed = 220422 | ### Instruction:
How to declare a variable speed with value 220422 in Python?
### Response:
speed = 220422 |
91,689,123 | en | C++ | array_ops | intermediate | Write a function that filters only even numbers from a list in 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:
Write a function that filters only even numbers from a list in 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;
} |
9,315 | kk | Java | var_decl | beginner | Java тілінде 762048 мәнімен result айнымалысын қалай жариялауға болады? | int result = 762048; | ### Instruction:
Java тілінде 762048 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 762048; |
54,799,708 | 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;
} |
53,269,466 | 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;
} |
54,166,772 | 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;
} |
81,572,894 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 250 простым. | public bool IsPrime() {
int n = 250;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 250 простым.
### Response:
public bool IsPrime() {
int n = 250;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
18,741,575 | 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();
} |
56,441,261 | en | JavaScript | array_ops | intermediate | 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(); |
10,735,904 | 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);
} |
49,750,038 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 367 is prime in JavaScript. | function isPrime() {
let n = 367;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 367 is prime in JavaScript.
### Response:
function isPrime() {
let n = 367;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,119,499 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 393798 в Java? | int size = 393798; | ### Instruction:
Как объявить переменную size со значением 393798 в Java?
### Response:
int size = 393798; |
59,899,092 | 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();
} |
58,718,215 | 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;
} |
74,028,400 | kk | 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); |
42,930,470 | kk | Unity | logic_ops | advanced | Unity тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,590,216 | kk | Python | var_decl | beginner | Python тілінде 45803 мәнімен amount айнымалысын қалай жариялауға болады? | amount = 45803 | ### Instruction:
Python тілінде 45803 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
amount = 45803 |
79,050,063 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 406 простым. | public bool IsPrime() {
int n = 406;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 406 простым.
### Response:
public bool IsPrime() {
int n = 406;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
80,145,815 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2051 високосным. | public bool IsLeap() {
int y = 2051;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2051 високосным.
### Response:
public bool IsLeap() {
int y = 2051;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,385,728 | ru | C++ | var_decl | beginner | Как объявить переменную x со значением 456935 в C++? | int x = 456935; | ### Instruction:
Как объявить переменную x со значением 456935 в C++?
### Response:
int x = 456935; |
57,317,566 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 458 простым. | def is_prime():
n = 458
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 458 простым.
### Response:
def is_prime():
n = 458
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
14,827,802 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
52,378,341 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2093 високосным. | public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2093 високосным.
### Response:
public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
64,120 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 9706. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9706) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 9706.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9706) << std::endl; |
3,397,614 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 478700 мәнімен index айнымалысын қалай жариялауға болады? | let index = 478700; | ### Instruction:
JavaScript тілінде 478700 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 478700; |
12,424,090 | 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();
} |
1,216,181 | kk | Unity | var_decl | beginner | Unity тілінде 98512 мәнімен data айнымалысын қалай жариялауға болады? | int data = 98512; | ### Instruction:
Unity тілінде 98512 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 98512; |
576,837 | kk | Unity | var_decl | beginner | Unity тілінде 349783 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 349783; | ### Instruction:
Unity тілінде 349783 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 349783; |
40,973,923 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
57,417,554 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
33,761,250 | ru | 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;
} |
1,878,128 | en | Python | var_decl | beginner | How to declare a variable data with value 366101 in Python? | data = 366101 | ### Instruction:
How to declare a variable data with value 366101 in Python?
### Response:
data = 366101 |
2,493,079 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 625508 мәнімен health айнымалысын қалай жариялауға болады? | let health = 625508; | ### Instruction:
JavaScript тілінде 625508 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
let health = 625508; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.