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 |
|---|---|---|---|---|---|---|---|
62,109,108 | en | Unity | string_ops | intermediate | Write a function that counts vowels in a text in Unity. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
530,189 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 9987. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9987) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 9987.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9987) << std::endl; |
3,363,569 | kk | Java | var_decl | beginner | Java тілінде 372368 мәнімен result айнымалысын қалай жариялауға болады? | int result = 372368; | ### Instruction:
Java тілінде 372368 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 372368; |
4,490,293 | ru | Unity | var_decl | beginner | Как объявить переменную timer со значением 854030 в Unity? | int timer = 854030; | ### Instruction:
Как объявить переменную timer со значением 854030 в Unity?
### Response:
int timer = 854030; |
62,852,031 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1906 is a leap year in Unity. | public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1906 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,212,282 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 7981. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(7981)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 7981.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(7981)); |
3,986,822 | en | Python | var_decl | beginner | How to declare a variable y with value 307044 in Python? | y = 307044 | ### Instruction:
How to declare a variable y with value 307044 in Python?
### Response:
y = 307044 |
243,557 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 6358-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6358)) | ### Instruction:
Python тілінде 1-ден 6358-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6358)) |
445,340 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 326. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(326)); | ### Instruction:
Write a function in C# that calculates the factorial of 326.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(326)); |
302,964 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 4138. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4138) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 4138.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4138) << std::endl; |
82,229,931 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
50,175,425 | en | Java | logic_ops | intermediate | Write logic to check if the year 2034 is a leap year in Java. | public bool IsLeap() {
int y = 2034;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2034 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2034;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
569,566 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 457-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(457)); | ### Instruction:
JavaScript тілінде 1-ден 457-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(457)); |
4,110,317 | ru | JavaScript | var_decl | beginner | Как объявить переменную limit со значением 656376 в JavaScript? | let limit = 656376; | ### Instruction:
Как объявить переменную limit со значением 656376 в JavaScript?
### Response:
let limit = 656376; |
2,810,168 | kk | Java | var_decl | beginner | Java тілінде 510588 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 510588; | ### Instruction:
Java тілінде 510588 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 510588; |
455,260 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 2875. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2875)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 2875.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2875)); |
80,494,935 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
62,988,462 | 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;
} |
2,408,458 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 269615 мәнімен offset айнымалысын қалай жариялауға болады? | let offset = 269615; | ### Instruction:
JavaScript тілінде 269615 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
let offset = 269615; |
785,864 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 933556 в Java? | int score = 933556; | ### Instruction:
Как объявить переменную score со значением 933556 в Java?
### Response:
int score = 933556; |
91,685,179 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
2,487,697 | ru | Java | var_decl | beginner | Как объявить переменную limit со значением 349374 в Java? | int limit = 349374; | ### Instruction:
Как объявить переменную limit со значением 349374 в Java?
### Response:
int limit = 349374; |
55,050,037 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 33 is prime in Unity. | public bool IsPrime() {
int n = 33;
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 33 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 33;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,897,446 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 515651 мәнімен size айнымалысын қалай жариялауға болады? | let size = 515651; | ### Instruction:
JavaScript тілінде 515651 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
let size = 515651; |
2,212,082 | kk | C++ | var_decl | beginner | C++ тілінде 511459 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 511459; | ### Instruction:
C++ тілінде 511459 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 511459; |
4,648,742 | kk | Python | var_decl | beginner | Python тілінде 266274 мәнімен index айнымалысын қалай жариялауға болады? | index = 266274 | ### Instruction:
Python тілінде 266274 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 266274 |
3,325,690 | en | Unity | var_decl | beginner | How to declare a variable value with value 139638 in Unity? | int value = 139638; | ### Instruction:
How to declare a variable value with value 139638 in Unity?
### Response:
int value = 139638; |
28,965,702 | 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;
} |
55,544,493 | kk | C++ | logic_ops | advanced | C++ тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2012;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2012;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
77,408,199 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
55,755,588 | ru | 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;
} |
522,237 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 4999. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4999)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 4999.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4999)); |
60,874,441 | en | C# | string_ops | intermediate | 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();
} |
97,821,852 | 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;
} |
18,079,809 | 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();
} |
52,300,093 | 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;
} |
1,291,844 | kk | Unity | var_decl | beginner | Unity тілінде 399324 мәнімен y айнымалысын қалай жариялауға болады? | int y = 399324; | ### Instruction:
Unity тілінде 399324 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 399324; |
2,773,324 | kk | Java | var_decl | beginner | Java тілінде 312592 мәнімен y айнымалысын қалай жариялауға болады? | int y = 312592; | ### Instruction:
Java тілінде 312592 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 312592; |
4,269,048 | kk | Python | var_decl | beginner | Python тілінде 579330 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 579330 | ### Instruction:
Python тілінде 579330 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 579330 |
122,706 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 8475. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8475)) | ### Instruction:
Write a function in Python that calculates the factorial of 8475.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8475)) |
24,364,273 | 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;
} |
83,287,047 | ru | 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;
} |
1,492,898 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 450033 в JavaScript? | let index = 450033; | ### Instruction:
Как объявить переменную index со значением 450033 в JavaScript?
### Response:
let index = 450033; |
1,796,475 | kk | C++ | var_decl | beginner | C++ тілінде 543984 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 543984; | ### Instruction:
C++ тілінде 543984 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 543984; |
28,988,636 | 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;
} |
32,737,299 | 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;
} |
63,927,414 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая фильтрует только четные числа из списка. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Напишите на Python функцию, которая фильтрует только четные числа из списка.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
4,639,967 | kk | C++ | var_decl | beginner | C++ тілінде 166451 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 166451; | ### Instruction:
C++ тілінде 166451 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 166451; |
73,017,332 | kk | Python | logic_ops | advanced | Python тилінде 331 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 331
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 331 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 331
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
2,758,470 | kk | C# | var_decl | beginner | C# тілінде 91208 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 91208; | ### Instruction:
C# тілінде 91208 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 91208; |
28,681,983 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
567,327 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 4602. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4602)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 4602.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4602)); |
15,427,354 | kk | Unity | string_ops | advanced | 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;
} |
3,561,544 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 106450 в Python? | health = 106450 | ### Instruction:
Как объявить переменную health со значением 106450 в Python?
### Response:
health = 106450 |
4,676,416 | en | Java | var_decl | beginner | How to declare a variable offset with value 739311 in Java? | int offset = 739311; | ### Instruction:
How to declare a variable offset with value 739311 in Java?
### Response:
int offset = 739311; |
30,692,284 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
10,460,810 | 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] |
1,717,053 | ru | JavaScript | var_decl | beginner | Как объявить переменную value со значением 184803 в JavaScript? | let value = 184803; | ### Instruction:
Как объявить переменную value со значением 184803 в JavaScript?
### Response:
let value = 184803; |
54,893,904 | en | C# | array_ops | advanced | 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;
} |
33,096,825 | kk | C# | logic_ops | advanced | C# тилінде 490 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 490;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 490 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 490;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
33,125,022 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2028 високосным. | public bool IsLeap() {
int y = 2028;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2028 високосным.
### Response:
public bool IsLeap() {
int y = 2028;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,790,841 | ru | C++ | var_decl | beginner | Как объявить переменную x со значением 212864 в C++? | int x = 212864; | ### Instruction:
Как объявить переменную x со значением 212864 в C++?
### Response:
int x = 212864; |
33,798,441 | 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;
} |
11,873,824 | 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);
} |
4,147,168 | ru | C# | var_decl | beginner | Как объявить переменную count со значением 778421 в C#? | int count = 778421; | ### Instruction:
Как объявить переменную count со значением 778421 в C#?
### Response:
int count = 778421; |
53,925,761 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2047 is a leap year in JavaScript. | function isLeap() {
let y = 2047;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2047 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2047;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
428,550 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 392. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(392)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 392.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(392)) |
95,500,464 | 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();
} |
28,461,952 | kk | C++ | logic_ops | intermediate | C++ тилінде 475 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 475;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 475 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 475;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,851,660 | en | C# | var_decl | beginner | How to declare a variable limit with value 814754 in C#? | int limit = 814754; | ### Instruction:
How to declare a variable limit with value 814754 in C#?
### Response:
int limit = 814754; |
82,927,874 | 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;
} |
96,808,067 | kk | 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;
} |
66,584 | kk | Java | factorial | advanced | Java тілінде 2129 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2129)); | ### Instruction:
Java тілінде 2129 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2129)); |
79,715,269 | en | Python | string_ops | intermediate | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
54,778,763 | kk | Unity | logic_ops | advanced | Unity тилінде 2092 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2092 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,410,085 | en | JavaScript | var_decl | beginner | How to declare a variable buffer with value 847208 in JavaScript? | let buffer = 847208; | ### Instruction:
How to declare a variable buffer with value 847208 in JavaScript?
### Response:
let buffer = 847208; |
27,908,760 | kk | JavaScript | string_ops | advanced | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,063,228 | en | C++ | var_decl | beginner | How to declare a variable result with value 635585 in C++? | int result = 635585; | ### Instruction:
How to declare a variable result with value 635585 in C++?
### Response:
int result = 635585; |
560,184 | kk | C++ | factorial | advanced | C++ тілінде 2309 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2309) << std::endl; | ### Instruction:
C++ тілінде 2309 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2309) << std::endl; |
93,989,014 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 323 is prime in JavaScript. | function isPrime() {
let n = 323;
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 323 is prime in JavaScript.
### Response:
function isPrime() {
let n = 323;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,856,108 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 83132 в Java? | int score = 83132; | ### Instruction:
Как объявить переменную score со значением 83132 в Java?
### Response:
int score = 83132; |
76,264,512 | en | Python | logic_ops | intermediate | Write a function that determines if the number 157 is prime in Python. | def is_prime():
n = 157
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 157 is prime in Python.
### Response:
def is_prime():
n = 157
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
32,421,368 | 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;
} |
65,187,568 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 466 простым. | public bool IsPrime() {
int n = 466;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 466 простым.
### Response:
public bool IsPrime() {
int n = 466;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
514,008 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 4079. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4079)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 4079.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4079)) |
1,671,355 | kk | C# | var_decl | beginner | C# тілінде 348352 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 348352; | ### Instruction:
C# тілінде 348352 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 348352; |
96,906,075 | kk | Python | logic_ops | intermediate | Python тилінде 391 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 391
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 391 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 391
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
2,691,825 | en | C++ | var_decl | beginner | How to declare a variable score with value 866634 in C++? | int score = 866634; | ### Instruction:
How to declare a variable score with value 866634 in C++?
### Response:
int score = 866634; |
553,924 | ru | Java | var_decl | beginner | Как объявить переменную rate со значением 949326 в Java? | int rate = 949326; | ### Instruction:
Как объявить переменную rate со значением 949326 в Java?
### Response:
int rate = 949326; |
493,126 | kk | C++ | factorial | advanced | C++ тілінде 3510 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(3510) << std::endl; | ### Instruction:
C++ тілінде 3510 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(3510) << std::endl; |
3,367,826 | kk | C++ | var_decl | beginner | C++ тілінде 778894 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 778894; | ### Instruction:
C++ тілінде 778894 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 778894; |
4,620,756 | kk | C# | var_decl | beginner | C# тілінде 77255 мәнімен size айнымалысын қалай жариялауға болады? | int size = 77255; | ### Instruction:
C# тілінде 77255 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 77255; |
92,555 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 3734. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3734)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 3734.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3734)) |
20,064,400 | en | Java | string_ops | intermediate | 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;
} |
642,637 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 2108. | 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(2108) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 2108.
### 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(2108) << std::endl; |
35,317,272 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
76,306,815 | 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);
} |
97,057,479 | 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;
} |
1,487,219 | en | Java | var_decl | beginner | How to declare a variable x with value 201137 in Java? | int x = 201137; | ### Instruction:
How to declare a variable x with value 201137 in Java?
### Response:
int x = 201137; |
3,135,080 | ru | Python | var_decl | beginner | Как объявить переменную result со значением 452311 в Python? | result = 452311 | ### Instruction:
Как объявить переменную result со значением 452311 в Python?
### Response:
result = 452311 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.