id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
33,837,847 | 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;
} |
16,958,737 | kk | 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;
} |
2,646,649 | en | Unity | var_decl | beginner | How to declare a variable health with value 799745 in Unity? | int health = 799745; | ### Instruction:
How to declare a variable health with value 799745 in Unity?
### Response:
int health = 799745; |
2,118,797 | kk | Java | var_decl | beginner | Java тілінде 862120 мәнімен size айнымалысын қалай жариялауға болады? | int size = 862120; | ### Instruction:
Java тілінде 862120 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 862120; |
3,947,113 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 968532 в C++? | int rate = 968532; | ### Instruction:
Как объявить переменную rate со значением 968532 в C++?
### Response:
int rate = 968532; |
10,364,241 | en | Unity | logic_ops | advanced | Write a function that determines if the number 98 is prime in Unity. | public bool IsPrime() {
int n = 98;
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 98 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 98;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
41,411,807 | 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;
} |
2,869,597 | en | Python | var_decl | beginner | How to declare a variable result with value 852616 in Python? | result = 852616 | ### Instruction:
How to declare a variable result with value 852616 in Python?
### Response:
result = 852616 |
4,675,842 | ru | JavaScript | var_decl | beginner | Как объявить переменную health со значением 103610 в JavaScript? | let health = 103610; | ### Instruction:
Как объявить переменную health со значением 103610 в JavaScript?
### Response:
let health = 103610; |
2,430,018 | kk | Unity | var_decl | beginner | Unity тілінде 27349 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 27349; | ### Instruction:
Unity тілінде 27349 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 27349; |
99,637,608 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1923 is a leap year in Unity. | public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1923 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,341,047 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 717801 мәнімен index айнымалысын қалай жариялауға болады? | let index = 717801; | ### Instruction:
JavaScript тілінде 717801 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 717801; |
84,756,888 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 160 is prime in Unity. | public bool IsPrime() {
int n = 160;
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 160 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 160;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
66,565,650 | 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;
} |
4,703,907 | en | JavaScript | var_decl | beginner | How to declare a variable rate with value 659490 in JavaScript? | let rate = 659490; | ### Instruction:
How to declare a variable rate with value 659490 in JavaScript?
### Response:
let rate = 659490; |
60,137,024 | 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);
} |
89,750,179 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,568,774 | kk | Python | var_decl | beginner | Python тілінде 173887 мәнімен offset айнымалысын қалай жариялауға болады? | offset = 173887 | ### Instruction:
Python тілінде 173887 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
offset = 173887 |
59,851,285 | kk | Python | logic_ops | advanced | Python тилінде 1923 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1923
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1923 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1923
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,196,280 | kk | Java | var_decl | beginner | Java тілінде 546860 мәнімен x айнымалысын қалай жариялауға болады? | int x = 546860; | ### Instruction:
Java тілінде 546860 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 546860; |
20,428,661 | en | Java | logic_ops | intermediate | Write a function that determines if the number 417 is prime in Java. | public bool IsPrime() {
int n = 417;
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 417 is prime in Java.
### Response:
public bool IsPrime() {
int n = 417;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,088,384 | ru | Python | var_decl | beginner | Как объявить переменную rate со значением 90691 в Python? | rate = 90691 | ### Instruction:
Как объявить переменную rate со значением 90691 в Python?
### Response:
rate = 90691 |
1,047,344 | en | C++ | var_decl | beginner | How to declare a variable weight with value 792244 in C++? | int weight = 792244; | ### Instruction:
How to declare a variable weight with value 792244 in C++?
### Response:
int weight = 792244; |
59,032,957 | ru | 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;
} |
30,612,129 | 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();
} |
86,194,618 | kk | C++ | string_ops | advanced | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
4,759,797 | ru | JavaScript | var_decl | beginner | Как объявить переменную data со значением 673078 в JavaScript? | let data = 673078; | ### Instruction:
Как объявить переменную data со значением 673078 в JavaScript?
### Response:
let data = 673078; |
4,770,153 | ru | JavaScript | var_decl | beginner | Как объявить переменную speed со значением 61145 в JavaScript? | let speed = 61145; | ### Instruction:
Как объявить переменную speed со значением 61145 в JavaScript?
### Response:
let speed = 61145; |
73,779,126 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 369 is prime in JavaScript. | function isPrime() {
let n = 369;
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 369 is prime in JavaScript.
### Response:
function isPrime() {
let n = 369;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
77,953,329 | kk | C++ | logic_ops | intermediate | C++ тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2036;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2036 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2036;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
344,819 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 3423. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3423)); | ### Instruction:
Write a function in Java that calculates the factorial of 3423.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3423)); |
2,233,979 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 301777 в JavaScript? | let index = 301777; | ### Instruction:
Как объявить переменную index со значением 301777 в JavaScript?
### Response:
let index = 301777; |
98,670,759 | kk | Unity | array_ops | intermediate | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
80,689,559 | 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); |
3,545,202 | en | Java | var_decl | beginner | How to declare a variable x with value 516848 in Java? | int x = 516848; | ### Instruction:
How to declare a variable x with value 516848 in Java?
### Response:
int x = 516848; |
393,715 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 2734. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2734) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 2734.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2734) << std::endl; |
41,627,927 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
34,053,019 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 418 is prime in C++. | public bool IsPrime() {
int n = 418;
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 418 is prime in C++.
### Response:
public bool IsPrime() {
int n = 418;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
202,491 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 6362. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6362)); | ### Instruction:
Write a function in Java that calculates the factorial of 6362.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6362)); |
98,017,583 | 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();
} |
94,538,440 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 69 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 69;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 69 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 69;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,205,711 | kk | Unity | var_decl | beginner | Unity тілінде 374898 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 374898; | ### Instruction:
Unity тілінде 374898 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 374898; |
48,894,191 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
53,525,434 | en | Python | string_ops | intermediate | 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] |
17,394,625 | kk | 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] |
60,394,423 | kk | C++ | logic_ops | advanced | C++ тилінде 99 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 99;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 99 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 99;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
452,637 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 3625. | 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(3625) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 3625.
### 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(3625) << std::endl; |
12,902,056 | en | Unity | array_ops | intermediate | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
85,632,875 | 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] |
31,711,691 | ru | C# | array_ops | advanced | Напишите на C# функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C# функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
1,717,090 | en | C++ | var_decl | beginner | How to declare a variable health with value 661763 in C++? | int health = 661763; | ### Instruction:
How to declare a variable health with value 661763 in C++?
### Response:
int health = 661763; |
1,181,523 | en | Java | var_decl | beginner | How to declare a variable buffer with value 308790 in Java? | int buffer = 308790; | ### Instruction:
How to declare a variable buffer with value 308790 in Java?
### Response:
int buffer = 308790; |
11,165,535 | en | C++ | array_ops | advanced | Write a function that finds the maximum number in an array in C++. | 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 C++.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
52,909,076 | ru | Java | string_ops | advanced | Напишите на 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;
} |
2,262,039 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 721924 in JavaScript? | let level = 721924; | ### Instruction:
How to declare a variable level with value 721924 in JavaScript?
### Response:
let level = 721924; |
847,830 | en | JavaScript | var_decl | beginner | How to declare a variable buffer with value 934983 in JavaScript? | let buffer = 934983; | ### Instruction:
How to declare a variable buffer with value 934983 in JavaScript?
### Response:
let buffer = 934983; |
86,945,118 | en | C# | logic_ops | advanced | Write logic to check if the year 2001 is a leap year in C#. | public bool IsLeap() {
int y = 2001;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2001 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2001;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,381,947 | 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(); |
216,097 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9405. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9405)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9405.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9405)); |
44,879,130 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 284 простым. | public bool IsPrime() {
int n = 284;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 284 простым.
### Response:
public bool IsPrime() {
int n = 284;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,240,784 | kk | Unity | var_decl | beginner | Unity тілінде 574431 мәнімен y айнымалысын қалай жариялауға болады? | int y = 574431; | ### Instruction:
Unity тілінде 574431 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 574431; |
526,799 | en | C++ | var_decl | beginner | How to declare a variable rate with value 701037 in C++? | int rate = 701037; | ### Instruction:
How to declare a variable rate with value 701037 in C++?
### Response:
int rate = 701037; |
98,742,704 | en | JavaScript | string_ops | advanced | 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(''); |
36,307,179 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
406,847 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 7538-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7538)); | ### Instruction:
Java тілінде 1-ден 7538-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7538)); |
52,509,516 | 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;
} |
17,278,376 | en | Java | logic_ops | advanced | Write a function that determines if the number 348 is prime in Java. | public bool IsPrime() {
int n = 348;
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 348 is prime in Java.
### Response:
public bool IsPrime() {
int n = 348;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,188,733 | en | Python | var_decl | beginner | How to declare a variable buffer with value 822615 in Python? | buffer = 822615 | ### Instruction:
How to declare a variable buffer with value 822615 in Python?
### Response:
buffer = 822615 |
15,956,812 | 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] |
45,818,866 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
43,960,166 | en | Unity | logic_ops | advanced | Write a function that determines if the number 454 is prime in Unity. | public bool IsPrime() {
int n = 454;
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 454 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 454;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,799,323 | ru | Java | var_decl | beginner | Как объявить переменную value со значением 474470 в Java? | int value = 474470; | ### Instruction:
Как объявить переменную value со значением 474470 в Java?
### Response:
int value = 474470; |
52,317,242 | kk | C# | array_ops | advanced | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,571,006 | kk | C++ | var_decl | beginner | C++ тілінде 463785 мәнімен result айнымалысын қалай жариялауға болады? | int result = 463785; | ### Instruction:
C++ тілінде 463785 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 463785; |
3,996,384 | en | Java | var_decl | beginner | How to declare a variable buffer with value 757250 in Java? | int buffer = 757250; | ### Instruction:
How to declare a variable buffer with value 757250 in Java?
### Response:
int buffer = 757250; |
24,952,179 | en | C++ | string_ops | intermediate | 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;
} |
2,732,813 | ru | C++ | var_decl | beginner | Как объявить переменную speed со значением 689673 в C++? | int speed = 689673; | ### Instruction:
Как объявить переменную speed со значением 689673 в C++?
### Response:
int speed = 689673; |
4,245,555 | ru | Java | var_decl | beginner | Как объявить переменную offset со значением 312579 в Java? | int offset = 312579; | ### Instruction:
Как объявить переменную offset со значением 312579 в Java?
### Response:
int offset = 312579; |
53,571,489 | 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);
} |
81,358,130 | en | Unity | array_ops | intermediate | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
85,962,389 | 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;
} |
300,577 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 819-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(819)); | ### Instruction:
JavaScript тілінде 1-ден 819-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(819)); |
2,608,136 | ru | C++ | var_decl | beginner | Как объявить переменную data со значением 376124 в C++? | int data = 376124; | ### Instruction:
Как объявить переменную data со значением 376124 в C++?
### Response:
int data = 376124; |
2,164,310 | kk | C++ | var_decl | beginner | C++ тілінде 86294 мәнімен count айнымалысын қалай жариялауға болады? | int count = 86294; | ### Instruction:
C++ тілінде 86294 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 86294; |
4,527,097 | kk | C# | var_decl | beginner | C# тілінде 952688 мәнімен value айнымалысын қалай жариялауға болады? | int value = 952688; | ### Instruction:
C# тілінде 952688 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 952688; |
42,609,017 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2072 високосным. | function isLeap() {
let y = 2072;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2072 високосным.
### Response:
function isLeap() {
let y = 2072;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
25,080,679 | ru | C# | string_ops | advanced | Напишите на 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;
} |
42,489,671 | 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аеёиоуыэюя') |
873,988 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 652054 в Unity? | int x = 652054; | ### Instruction:
Как объявить переменную x со значением 652054 в Unity?
### Response:
int x = 652054; |
91,626,249 | kk | 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;
} |
67,717,472 | en | C++ | string_ops | intermediate | 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;
} |
302,994 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 139. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(139)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 139.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(139)); |
2,616,379 | kk | Java | var_decl | beginner | Java тілінде 108971 мәнімен value айнымалысын қалай жариялауға болады? | int value = 108971; | ### Instruction:
Java тілінде 108971 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 108971; |
3,491,616 | en | Python | var_decl | beginner | How to declare a variable rate with value 809900 in Python? | rate = 809900 | ### Instruction:
How to declare a variable rate with value 809900 in Python?
### Response:
rate = 809900 |
3,573,836 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 919128 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 919128; | ### Instruction:
JavaScript тілінде 919128 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 919128; |
18,286,357 | en | Python | logic_ops | intermediate | Write logic to check if the year 1957 is a leap year in Python. | def is_leap():
year = 1957
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1957 is a leap year in Python.
### Response:
def is_leap():
year = 1957
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,728,260 | ru | C++ | var_decl | beginner | Как объявить переменную data со значением 877472 в C++? | int data = 877472; | ### Instruction:
Как объявить переменную data со значением 877472 в C++?
### Response:
int data = 877472; |
41,396,900 | en | Python | logic_ops | intermediate | Write logic to check if the year 2027 is a leap year in Python. | def is_leap():
year = 2027
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2027 is a leap year in Python.
### Response:
def is_leap():
year = 2027
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,768,808 | en | C++ | var_decl | beginner | How to declare a variable count with value 742339 in C++? | int count = 742339; | ### Instruction:
How to declare a variable count with value 742339 in C++?
### Response:
int count = 742339; |
363,413 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 2304. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2304)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 2304.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2304)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.