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 |
|---|---|---|---|---|---|---|---|
3,120,995 | en | Unity | var_decl | beginner | How to declare a variable amount with value 105058 in Unity? | int amount = 105058; | ### Instruction:
How to declare a variable amount with value 105058 in Unity?
### Response:
int amount = 105058; |
83,612,299 | ru | 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,609,908 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 989671 в Java? | int size = 989671; | ### Instruction:
Как объявить переменную size со значением 989671 в Java?
### Response:
int size = 989671; |
65,443,982 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 216 простым. | function isPrime() {
let n = 216;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 216 простым.
### Response:
function isPrime() {
let n = 216;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
86,713,969 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 2015 високосным. | public bool IsLeap() {
int y = 2015;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2015 високосным.
### Response:
public bool IsLeap() {
int y = 2015;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
25,932,513 | kk | C++ | string_ops | advanced | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,361,837 | kk | Python | var_decl | beginner | Python тілінде 112342 мәнімен buffer айнымалысын қалай жариялауға болады? | buffer = 112342 | ### Instruction:
Python тілінде 112342 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
buffer = 112342 |
43,600,842 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
83,197,927 | 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;
} |
249,839 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 7353. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7353));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 7353.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7353));
} |
2,615,742 | kk | C# | var_decl | beginner | C# тілінде 681745 мәнімен total айнымалысын қалай жариялауға болады? | int total = 681745; | ### Instruction:
C# тілінде 681745 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 681745; |
4,367,650 | kk | Unity | var_decl | beginner | Unity тілінде 944205 мәнімен data айнымалысын қалай жариялауға болады? | int data = 944205; | ### Instruction:
Unity тілінде 944205 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 944205; |
94,575,323 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 294 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 294;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 294 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 294;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
2,705,724 | kk | C# | var_decl | beginner | C# тілінде 220754 мәнімен x айнымалысын қалай жариялауға болады? | int x = 220754; | ### Instruction:
C# тілінде 220754 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 220754; |
4,677,432 | en | Python | var_decl | beginner | How to declare a variable result with value 27093 in Python? | result = 27093 | ### Instruction:
How to declare a variable result with value 27093 in Python?
### Response:
result = 27093 |
93,948,834 | 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();
} |
3,688,966 | ru | JavaScript | var_decl | beginner | Как объявить переменную value со значением 680602 в JavaScript? | let value = 680602; | ### Instruction:
Как объявить переменную value со значением 680602 в JavaScript?
### Response:
let value = 680602; |
94,379,826 | kk | Python | logic_ops | intermediate | Python тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 166
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 166
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
967,241 | kk | Unity | var_decl | beginner | Unity тілінде 239407 мәнімен count айнымалысын қалай жариялауға болады? | int count = 239407; | ### Instruction:
Unity тілінде 239407 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 239407; |
85,291,795 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 165 is prime in JavaScript. | function isPrime() {
let n = 165;
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 165 is prime in JavaScript.
### Response:
function isPrime() {
let n = 165;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
2,262,060 | kk | Python | var_decl | beginner | Python тілінде 202337 мәнімен rate айнымалысын қалай жариялауға болады? | rate = 202337 | ### Instruction:
Python тілінде 202337 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
rate = 202337 |
76,128,882 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2056 високосным. | public bool IsLeap() {
int y = 2056;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2056 високосным.
### Response:
public bool IsLeap() {
int y = 2056;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
90,668,933 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
371,234 | kk | Unity | factorial | advanced | Unity тілінде 6855 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6855));
} | ### Instruction:
Unity тілінде 6855 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6855));
} |
156,782 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 6412. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6412) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 6412.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6412) << std::endl; |
49,357,045 | en | Unity | string_ops | advanced | Write a function that checks if a string is a palindrome in Unity. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Unity.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
20,655,059 | kk | 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;
} |
45,321,402 | 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;
} |
76,394,694 | en | Unity | string_ops | advanced | 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;
} |
4,223,516 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 604243 в Unity? | int amount = 604243; | ### Instruction:
Как объявить переменную amount со значением 604243 в Unity?
### Response:
int amount = 604243; |
3,431,855 | kk | Python | var_decl | beginner | Python тілінде 413658 мәнімен health айнымалысын қалай жариялауға болады? | health = 413658 | ### Instruction:
Python тілінде 413658 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
health = 413658 |
2,148,031 | kk | C# | var_decl | beginner | C# тілінде 595743 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 595743; | ### Instruction:
C# тілінде 595743 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 595743; |
2,533,588 | ru | C# | var_decl | beginner | Как объявить переменную y со значением 979791 в C#? | int y = 979791; | ### Instruction:
Как объявить переменную y со значением 979791 в C#?
### Response:
int y = 979791; |
2,109,998 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 615737 в Java? | int count = 615737; | ### Instruction:
Как объявить переменную count со значением 615737 в Java?
### Response:
int count = 615737; |
42,328,924 | 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();
} |
72,006,880 | 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,603,379 | 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);
} |
330,834 | ru | C# | var_decl | beginner | Как объявить переменную value со значением 931971 в C#? | int value = 931971; | ### Instruction:
Как объявить переменную value со значением 931971 в C#?
### Response:
int value = 931971; |
16,904,133 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 2093 високосным. | public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2093 високосным.
### Response:
public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,635,479 | kk | C++ | var_decl | beginner | C++ тілінде 273881 мәнімен count айнымалысын қалай жариялауға болады? | int count = 273881; | ### Instruction:
C++ тілінде 273881 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 273881; |
91,946,870 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1951 високосным. | def is_leap():
year = 1951
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1951 високосным.
### Response:
def is_leap():
year = 1951
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
62,165,807 | kk | 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;
} |
675,188 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 2584. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2584)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 2584.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2584)); |
14,264,962 | 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;
} |
764,074 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 7314. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7314)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 7314.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7314)); |
215,411 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 3613. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3613));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 3613.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3613));
} |
46,487,882 | kk | C# | array_ops | intermediate | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
62,722,886 | 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;
} |
76,936,397 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1915 високосным. | public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1915 високосным.
### Response:
public bool IsLeap() {
int y = 1915;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
39,476,339 | 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;
} |
4,584,816 | kk | Unity | var_decl | beginner | Unity тілінде 158151 мәнімен level айнымалысын қалай жариялауға болады? | int level = 158151; | ### Instruction:
Unity тілінде 158151 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 158151; |
1,924,539 | en | Unity | var_decl | beginner | How to declare a variable offset with value 720712 in Unity? | int offset = 720712; | ### Instruction:
How to declare a variable offset with value 720712 in Unity?
### Response:
int offset = 720712; |
1,738,782 | kk | C++ | var_decl | beginner | C++ тілінде 162573 мәнімен index айнымалысын қалай жариялауға болады? | int index = 162573; | ### Instruction:
C++ тілінде 162573 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 162573; |
97,401,283 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Java функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
78,940,279 | 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(); |
93,875,157 | 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;
} |
92,437,897 | 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;
} |
4,076,502 | ru | Python | var_decl | beginner | Как объявить переменную value со значением 918925 в Python? | value = 918925 | ### Instruction:
Как объявить переменную value со значением 918925 в Python?
### Response:
value = 918925 |
25,199,746 | en | C# | string_ops | advanced | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
3,581,781 | en | Unity | var_decl | beginner | How to declare a variable index with value 371121 in Unity? | int index = 371121; | ### Instruction:
How to declare a variable index with value 371121 in Unity?
### Response:
int index = 371121; |
60,643,694 | en | Python | logic_ops | intermediate | Write logic to check if the year 2096 is a leap year in Python. | def is_leap():
year = 2096
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2096 is a leap year in Python.
### Response:
def is_leap():
year = 2096
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
56,198,745 | 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;
} |
17,633,242 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
1,012,354 | en | C# | var_decl | beginner | How to declare a variable amount with value 486098 in C#? | int amount = 486098; | ### Instruction:
How to declare a variable amount with value 486098 in C#?
### Response:
int amount = 486098; |
46,990,928 | ru | Java | array_ops | intermediate | Напишите на 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;
} |
2,950,128 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 521499 in JavaScript? | let speed = 521499; | ### Instruction:
How to declare a variable speed with value 521499 in JavaScript?
### Response:
let speed = 521499; |
84,346,024 | en | JavaScript | string_ops | intermediate | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
35,078,403 | kk | Java | string_ops | intermediate | Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
74,890,682 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1985 is a leap year in JavaScript. | function isLeap() {
let y = 1985;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1985 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1985;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
85,964,226 | kk | C# | logic_ops | advanced | C# тилінде 309 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 309;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 309 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 309;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
67,076,089 | kk | Python | logic_ops | advanced | Python тилінде 230 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 230
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 230 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 230
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
41,201,904 | en | Python | string_ops | advanced | 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аеёиоуыэюя') |
10,136 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 9447. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9447)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 9447.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9447)); |
72,530,556 | 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); |
84,909,784 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
2,503,059 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 369532 в Unity? | int index = 369532; | ### Instruction:
Как объявить переменную index со значением 369532 в Unity?
### Response:
int index = 369532; |
91,001,907 | en | C++ | logic_ops | advanced | Write logic to check if the year 1912 is a leap year in C++. | public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1912 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
22,149,327 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
40,795,193 | en | Python | logic_ops | advanced | Write logic to check if the year 2042 is a leap year in Python. | def is_leap():
year = 2042
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2042 is a leap year in Python.
### Response:
def is_leap():
year = 2042
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,558,353 | kk | C++ | var_decl | beginner | C++ тілінде 278967 мәнімен score айнымалысын қалай жариялауға болады? | int score = 278967; | ### Instruction:
C++ тілінде 278967 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 278967; |
97,378,152 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
77,670,970 | en | JavaScript | string_ops | intermediate | 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(); |
47,454,604 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
88,907,098 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1949 високосным. | def is_leap():
year = 1949
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1949 високосным.
### Response:
def is_leap():
year = 1949
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
14,621,298 | en | Java | logic_ops | advanced | Write a function that determines if the number 305 is prime in Java. | public bool IsPrime() {
int n = 305;
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 305 is prime in Java.
### Response:
public bool IsPrime() {
int n = 305;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,949,283 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 521475 в Java? | int data = 521475; | ### Instruction:
Как объявить переменную data со значением 521475 в Java?
### Response:
int data = 521475; |
70,302,121 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
4,528,634 | kk | Java | var_decl | beginner | Java тілінде 456691 мәнімен y айнымалысын қалай жариялауға болады? | int y = 456691; | ### Instruction:
Java тілінде 456691 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 456691; |
70,450,730 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
1,441,919 | ru | C# | var_decl | beginner | Как объявить переменную result со значением 16397 в C#? | int result = 16397; | ### Instruction:
Как объявить переменную result со значением 16397 в C#?
### Response:
int result = 16397; |
96,098,244 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2023 високосным. | public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2023 високосным.
### Response:
public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
268,172 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 1820. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1820)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 1820.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1820)); |
23,289,547 | kk | C++ | logic_ops | intermediate | C++ тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2080;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2080;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
40,371,770 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
49,764,237 | 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;
} |
48,847,221 | 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);
} |
39,998,191 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
22,452,311 | en | JavaScript | array_ops | intermediate | 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); |
762,736 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 1882-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1882)) | ### Instruction:
Python тілінде 1-ден 1882-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1882)) |
2,262,251 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 548793 в Unity? | int count = 548793; | ### Instruction:
Как объявить переменную count со значением 548793 в Unity?
### Response:
int count = 548793; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.