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,142,225 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 504310 в C++? | int amount = 504310; | ### Instruction:
Как объявить переменную amount со значением 504310 в C++?
### Response:
int amount = 504310; |
633,019 | kk | C# | factorial | advanced | C# тілінде 6148 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6148)); | ### Instruction:
C# тілінде 6148 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6148)); |
64,024,948 | kk | C# | logic_ops | intermediate | C# тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1927;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1927;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
60,452,158 | 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;
} |
3,341,755 | en | C# | var_decl | beginner | How to declare a variable x with value 953599 in C#? | int x = 953599; | ### Instruction:
How to declare a variable x with value 953599 in C#?
### Response:
int x = 953599; |
88,178,947 | en | C++ | logic_ops | advanced | Write logic to check if the year 2061 is a leap year in C++. | public bool IsLeap() {
int y = 2061;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2061 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2061;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
61,472,376 | en | C# | logic_ops | advanced | Write logic to check if the year 2098 is a leap year in C#. | public bool IsLeap() {
int y = 2098;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2098 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2098;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
32,849,323 | 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;
} |
96,551,042 | 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;
} |
70,022 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 6239. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6239));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 6239.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6239));
} |
70,775,846 | 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();
} |
2,695,916 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 857765 в Python? | limit = 857765 | ### Instruction:
Как объявить переменную limit со значением 857765 в Python?
### Response:
limit = 857765 |
166,592 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 2075. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2075));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2075.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2075));
} |
3,865,740 | en | Python | var_decl | beginner | How to declare a variable limit with value 635174 in Python? | limit = 635174 | ### Instruction:
How to declare a variable limit with value 635174 in Python?
### Response:
limit = 635174 |
96,855,286 | 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); |
278,783 | kk | C# | factorial | advanced | C# тілінде 1579 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(1579)); | ### Instruction:
C# тілінде 1579 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(1579)); |
2,841,430 | kk | Python | var_decl | beginner | Python тілінде 428289 мәнімен weight айнымалысын қалай жариялауға болады? | weight = 428289 | ### Instruction:
Python тілінде 428289 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
weight = 428289 |
1,468,817 | en | C# | var_decl | beginner | How to declare a variable health with value 908611 in C#? | int health = 908611; | ### Instruction:
How to declare a variable health with value 908611 in C#?
### Response:
int health = 908611; |
2,014,341 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 209806 in C++? | int buffer = 209806; | ### Instruction:
How to declare a variable buffer with value 209806 in C++?
### Response:
int buffer = 209806; |
727,536 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 29416 в Python? | health = 29416 | ### Instruction:
Как объявить переменную health со значением 29416 в Python?
### Response:
health = 29416 |
1,810,391 | kk | C# | var_decl | beginner | C# тілінде 674425 мәнімен result айнымалысын қалай жариялауға болады? | int result = 674425; | ### Instruction:
C# тілінде 674425 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 674425; |
703,247 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 3969-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3969)); | ### Instruction:
C# тілінде 1-ден 3969-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3969)); |
60,467,345 | 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;
} |
66,033,282 | en | JavaScript | array_ops | advanced | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
479,181 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 6580. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6580)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 6580.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6580)); |
30,580,921 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
54,340,905 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 2033 високосным. | public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2033 високосным.
### Response:
public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
754,084 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 6224. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6224));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 6224.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6224));
} |
45,436,500 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 2070 високосным. | public bool IsLeap() {
int y = 2070;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2070 високосным.
### Response:
public bool IsLeap() {
int y = 2070;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,821,253 | en | Unity | var_decl | beginner | How to declare a variable index with value 473508 in Unity? | int index = 473508; | ### Instruction:
How to declare a variable index with value 473508 in Unity?
### Response:
int index = 473508; |
74,983,673 | kk | Python | array_ops | intermediate | 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] |
13,987,337 | 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();
} |
57,531,667 | kk | Java | logic_ops | advanced | Java тилінде 405 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 405;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 405 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 405;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
15,914,648 | 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] |
63,617,518 | en | Unity | logic_ops | advanced | Write logic to check if the year 2092 is a leap year in Unity. | public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2092 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
53,614,413 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Java функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
52,339,510 | kk | Java | array_ops | intermediate | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
50,488,019 | 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;
} |
35,009,220 | kk | C++ | logic_ops | advanced | C++ тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 30;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 30;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
99,543,247 | 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(); |
639,682 | en | C++ | var_decl | beginner | How to declare a variable speed with value 306275 in C++? | int speed = 306275; | ### Instruction:
How to declare a variable speed with value 306275 in C++?
### Response:
int speed = 306275; |
12,543,573 | kk | Java | string_ops | intermediate | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
554,529 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 2358. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2358));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 2358.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2358));
} |
51,454,277 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2087 високосным. | public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2087 високосным.
### Response:
public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
52,474,069 | 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();
} |
75,130,701 | en | Python | logic_ops | advanced | Write a function that determines if the number 168 is prime in Python. | def is_prime():
n = 168
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 168 is prime in Python.
### Response:
def is_prime():
n = 168
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
2,516,959 | en | C# | var_decl | beginner | How to declare a variable size with value 630369 in C#? | int size = 630369; | ### Instruction:
How to declare a variable size with value 630369 in C#?
### Response:
int size = 630369; |
15,890,461 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
22,828,494 | 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;
} |
79,635,973 | 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] |
1,464,525 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 189976 в Python? | score = 189976 | ### Instruction:
Как объявить переменную score со значением 189976 в Python?
### Response:
score = 189976 |
1,814,339 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 90768 в C++? | int rate = 90768; | ### Instruction:
Как объявить переменную rate со значением 90768 в C++?
### Response:
int rate = 90768; |
3,720,890 | kk | Python | var_decl | beginner | Python тілінде 138781 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 138781 | ### Instruction:
Python тілінде 138781 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 138781 |
86,094,993 | ru | C++ | array_ops | advanced | Напишите на C++ функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на C++ функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,151,179 | en | Java | var_decl | beginner | How to declare a variable count with value 630617 in Java? | int count = 630617; | ### Instruction:
How to declare a variable count with value 630617 in Java?
### Response:
int count = 630617; |
113,315 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 7751. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7751)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 7751.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7751)) |
4,220,388 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 761130 in JavaScript? | let total = 761130; | ### Instruction:
How to declare a variable total with value 761130 in JavaScript?
### Response:
let total = 761130; |
245,124 | ru | Python | var_decl | beginner | Как объявить переменную size со значением 613587 в Python? | size = 613587 | ### Instruction:
Как объявить переменную size со значением 613587 в Python?
### Response:
size = 613587 |
92,667,080 | 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();
} |
37,581,095 | en | Python | array_ops | intermediate | 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] |
91,971 | kk | C# | factorial | advanced | C# тілінде 9711 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9711)); | ### Instruction:
C# тілінде 9711 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9711)); |
45,627,103 | kk | C# | array_ops | intermediate | C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,935,496 | kk | Unity | var_decl | beginner | Unity тілінде 65588 мәнімен y айнымалысын қалай жариялауға болады? | int y = 65588; | ### Instruction:
Unity тілінде 65588 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 65588; |
32,049,808 | ru | 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;
} |
87,591,689 | 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;
} |
1,055,432 | en | Unity | var_decl | beginner | How to declare a variable weight with value 920369 in Unity? | int weight = 920369; | ### Instruction:
How to declare a variable weight with value 920369 in Unity?
### Response:
int weight = 920369; |
61,939,144 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
90,516,939 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
57,496,031 | 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;
} |
273,458 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 6451. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6451)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 6451.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6451)); |
22,739,216 | 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); |
2,200,794 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 407864 в JavaScript? | let rate = 407864; | ### Instruction:
Как объявить переменную rate со значением 407864 в JavaScript?
### Response:
let rate = 407864; |
55,831,541 | 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;
} |
40,867,578 | 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;
} |
3,334,889 | en | Java | var_decl | beginner | How to declare a variable result with value 973867 in Java? | int result = 973867; | ### Instruction:
How to declare a variable result with value 973867 in Java?
### Response:
int result = 973867; |
27,678 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 4986. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4986)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 4986.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4986)); |
2,904,162 | en | Unity | var_decl | beginner | How to declare a variable index with value 158862 in Unity? | int index = 158862; | ### Instruction:
How to declare a variable index with value 158862 in Unity?
### Response:
int index = 158862; |
55,076,833 | 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;
} |
96,450,044 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
37,518,447 | 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(); |
17,093,645 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
23,086,636 | kk | Python | logic_ops | intermediate | Python тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 211
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 211 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 211
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
42,142,515 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 387 is prime in JavaScript. | function isPrime() {
let n = 387;
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 387 is prime in JavaScript.
### Response:
function isPrime() {
let n = 387;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
85,002,693 | 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(''); |
865,179 | kk | Python | var_decl | beginner | Python тілінде 378501 мәнімен buffer айнымалысын қалай жариялауға болады? | buffer = 378501 | ### Instruction:
Python тілінде 378501 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
buffer = 378501 |
1,857,028 | en | C# | var_decl | beginner | How to declare a variable result with value 500095 in C#? | int result = 500095; | ### Instruction:
How to declare a variable result with value 500095 in C#?
### Response:
int result = 500095; |
63,050,394 | 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); |
40,619,408 | 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;
} |
895,381 | kk | Java | var_decl | beginner | Java тілінде 880149 мәнімен size айнымалысын қалай жариялауға болады? | int size = 880149; | ### Instruction:
Java тілінде 880149 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 880149; |
2,752,516 | kk | Python | var_decl | beginner | Python тілінде 946302 мәнімен x айнымалысын қалай жариялауға болады? | x = 946302 | ### Instruction:
Python тілінде 946302 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
x = 946302 |
4,712,130 | kk | Python | var_decl | beginner | Python тілінде 196760 мәнімен amount айнымалысын қалай жариялауға болады? | amount = 196760 | ### Instruction:
Python тілінде 196760 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
amount = 196760 |
3,913,470 | kk | Python | var_decl | beginner | Python тілінде 422880 мәнімен result айнымалысын қалай жариялауға болады? | result = 422880 | ### Instruction:
Python тілінде 422880 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
result = 422880 |
40,778,514 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
11,325,276 | 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();
} |
3,917,744 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 287649 in JavaScript? | let count = 287649; | ### Instruction:
How to declare a variable count with value 287649 in JavaScript?
### Response:
let count = 287649; |
4,096,269 | kk | C++ | var_decl | beginner | C++ тілінде 688753 мәнімен index айнымалысын қалай жариялауға болады? | int index = 688753; | ### Instruction:
C++ тілінде 688753 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 688753; |
52,217,495 | 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();
} |
86,308,273 | 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();
} |
55,760,579 | 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();
} |
721,628 | kk | C++ | factorial | advanced | C++ тілінде 7047 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7047) << std::endl; | ### Instruction:
C++ тілінде 7047 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7047) << std::endl; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.