id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
68,880,772 | en | Java | string_ops | intermediate | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
12,126 | kk | JavaScript | factorial | advanced | JavaScript тілінде 4256 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4256)); | ### Instruction:
JavaScript тілінде 4256 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4256)); |
98,662,416 | 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;
} |
20,079,802 | ru | C++ | array_ops | advanced | Напишите на C++ функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,025,918 | en | JavaScript | var_decl | beginner | How to declare a variable size with value 985319 in JavaScript? | let size = 985319; | ### Instruction:
How to declare a variable size with value 985319 in JavaScript?
### Response:
let size = 985319; |
814,500 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 2496. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2496));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2496.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2496));
} |
60,576,179 | en | Java | logic_ops | advanced | Write logic to check if the year 2083 is a leap year in Java. | public bool IsLeap() {
int y = 2083;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2083 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2083;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,660,039 | ru | JavaScript | var_decl | beginner | Как объявить переменную timer со значением 829851 в JavaScript? | let timer = 829851; | ### Instruction:
Как объявить переменную timer со значением 829851 в JavaScript?
### Response:
let timer = 829851; |
59,043,345 | en | C++ | array_ops | advanced | Write a function that filters only even numbers from a list in C++. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C++.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
47,027,545 | 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] |
88,618,553 | kk | C# | logic_ops | advanced | C# тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
576,880 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 5044. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5044) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 5044.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5044) << std::endl; |
718,151 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 4287. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4287)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 4287.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4287)); |
22,964,555 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая фильтрует только четные числа из списка. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Напишите на Python функцию, которая фильтрует только четные числа из списка.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
67,258,661 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1943;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1943;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
60,530,920 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
46,562,899 | en | C# | logic_ops | intermediate | Write logic to check if the year 1923 is a leap year in C#. | 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 C#.
### Response:
public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,290,873 | en | C++ | var_decl | beginner | How to declare a variable index with value 753365 in C++? | int index = 753365; | ### Instruction:
How to declare a variable index with value 753365 in C++?
### Response:
int index = 753365; |
3,607,949 | kk | Unity | var_decl | beginner | Unity тілінде 449577 мәнімен value айнымалысын қалай жариялауға болады? | int value = 449577; | ### Instruction:
Unity тілінде 449577 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 449577; |
385,364 | en | C# | var_decl | beginner | How to declare a variable rate with value 644936 in C#? | int rate = 644936; | ### Instruction:
How to declare a variable rate with value 644936 in C#?
### Response:
int rate = 644936; |
52,189,778 | kk | Unity | logic_ops | intermediate | Unity тилінде 1903 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1903;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1903 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1903;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
26,482,270 | kk | Unity | logic_ops | intermediate | Unity тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2019;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2019;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
583,767 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 1219. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1219)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 1219.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1219)) |
23,355,919 | kk | JavaScript | string_ops | advanced | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
81,138,251 | en | JavaScript | string_ops | intermediate | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
2,157,785 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 146337 в JavaScript? | let total = 146337; | ### Instruction:
Как объявить переменную total со значением 146337 в JavaScript?
### Response:
let total = 146337; |
82,945,515 | 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(''); |
12,384,825 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
15,024,724 | 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;
} |
80,868,846 | kk | Unity | logic_ops | advanced | Unity тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
85,934,013 | 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();
} |
51,407,682 | en | Java | string_ops | advanced | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
33,378,775 | en | Python | logic_ops | advanced | Write a function that determines if the number 10 is prime in Python. | def is_prime():
n = 10
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 10 is prime in Python.
### Response:
def is_prime():
n = 10
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
28,473,365 | 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(''); |
2,947,476 | ru | Java | var_decl | beginner | Как объявить переменную speed со значением 255647 в Java? | int speed = 255647; | ### Instruction:
Как объявить переменную speed со значением 255647 в Java?
### Response:
int speed = 255647; |
59,300,188 | 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;
} |
3,830,834 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 851703 в C++? | int y = 851703; | ### Instruction:
Как объявить переменную y со значением 851703 в C++?
### Response:
int y = 851703; |
29,099,593 | kk | Python | logic_ops | advanced | Python тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1986
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1986
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
50,317,685 | 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();
} |
66,622,980 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
41,727,394 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
488,093 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 8604. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8604)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 8604.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(8604)) |
38,776,798 | 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] |
32,445,199 | kk | Unity | array_ops | intermediate | 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;
} |
81,986,042 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 353 простым. | public bool IsPrime() {
int n = 353;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 353 простым.
### Response:
public bool IsPrime() {
int n = 353;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
87,319,570 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 2051 високосным. | def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2051 високосным.
### Response:
def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,969,820 | en | C# | var_decl | beginner | How to declare a variable x with value 599682 in C#? | int x = 599682; | ### Instruction:
How to declare a variable x with value 599682 in C#?
### Response:
int x = 599682; |
52,490,473 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
1,436,248 | kk | Java | var_decl | beginner | Java тілінде 353230 мәнімен y айнымалысын қалай жариялауға болады? | int y = 353230; | ### Instruction:
Java тілінде 353230 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 353230; |
2,141,542 | kk | Python | var_decl | beginner | Python тілінде 63218 мәнімен timer айнымалысын қалай жариялауға болады? | timer = 63218 | ### Instruction:
Python тілінде 63218 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
timer = 63218 |
79,605,240 | 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();
} |
11,972,515 | 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;
} |
34,034,644 | 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);
} |
86,402,673 | kk | Unity | logic_ops | advanced | Unity тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1929;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1929 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1929;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
56,245,921 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 1923 високосным. | public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1923 високосным.
### Response:
public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
82,408,728 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
46,796,056 | 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] |
33,674,768 | en | Java | logic_ops | intermediate | Write logic to check if the year 1998 is a leap year in Java. | public bool IsLeap() {
int y = 1998;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1998 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1998;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,797,268 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 52680 в Unity? | int value = 52680; | ### Instruction:
Как объявить переменную value со значением 52680 в Unity?
### Response:
int value = 52680; |
3,419,772 | kk | C++ | var_decl | beginner | C++ тілінде 371915 мәнімен x айнымалысын қалай жариялауға болады? | int x = 371915; | ### Instruction:
C++ тілінде 371915 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 371915; |
23,888,106 | 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;
} |
934,071 | en | Java | var_decl | beginner | How to declare a variable level with value 266401 in Java? | int level = 266401; | ### Instruction:
How to declare a variable level with value 266401 in Java?
### Response:
int level = 266401; |
83,117,620 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 315 простым. | public bool IsPrime() {
int n = 315;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 315 простым.
### Response:
public bool IsPrime() {
int n = 315;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,913,636 | en | C++ | var_decl | beginner | How to declare a variable weight with value 187748 in C++? | int weight = 187748; | ### Instruction:
How to declare a variable weight with value 187748 in C++?
### Response:
int weight = 187748; |
2,442,054 | kk | C# | var_decl | beginner | C# тілінде 179781 мәнімен y айнымалысын қалай жариялауға болады? | int y = 179781; | ### Instruction:
C# тілінде 179781 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 179781; |
87,474,470 | en | C# | logic_ops | intermediate | Write logic to check if the year 2000 is a leap year in C#. | public bool IsLeap() {
int y = 2000;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2000 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2000;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
84,286,135 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 229 простым. | public bool IsPrime() {
int n = 229;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 229 простым.
### Response:
public bool IsPrime() {
int n = 229;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,609,975 | kk | C++ | var_decl | beginner | C++ тілінде 629716 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 629716; | ### Instruction:
C++ тілінде 629716 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 629716; |
4,063,966 | en | Java | var_decl | beginner | How to declare a variable index with value 10637 in Java? | int index = 10637; | ### Instruction:
How to declare a variable index with value 10637 in Java?
### Response:
int index = 10637; |
84,960,645 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
81,108,122 | en | Java | logic_ops | advanced | Write a function that determines if the number 249 is prime in Java. | public bool IsPrime() {
int n = 249;
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 249 is prime in Java.
### Response:
public bool IsPrime() {
int n = 249;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
113,620 | en | Java | var_decl | beginner | How to declare a variable buffer with value 978608 in Java? | int buffer = 978608; | ### Instruction:
How to declare a variable buffer with value 978608 in Java?
### Response:
int buffer = 978608; |
60,905,237 | kk | Java | array_ops | advanced | Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
1,135,991 | en | Python | var_decl | beginner | How to declare a variable total with value 765622 in Python? | total = 765622 | ### Instruction:
How to declare a variable total with value 765622 in Python?
### Response:
total = 765622 |
56,797,315 | 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;
} |
53,068,391 | 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;
} |
42,504,121 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
56,248,658 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
28,105,100 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,068,072 | kk | Java | var_decl | beginner | Java тілінде 225226 мәнімен value айнымалысын қалай жариялауға болады? | int value = 225226; | ### Instruction:
Java тілінде 225226 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 225226; |
939,339 | kk | Java | var_decl | beginner | Java тілінде 187764 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 187764; | ### Instruction:
Java тілінде 187764 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 187764; |
71,384,542 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
79,034,655 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
63,529,244 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2069 високосным. | public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2069 високосным.
### Response:
public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,075,635 | ru | Unity | var_decl | beginner | Как объявить переменную result со значением 849804 в Unity? | int result = 849804; | ### Instruction:
Как объявить переменную result со значением 849804 в Unity?
### Response:
int result = 849804; |
62,222,786 | kk | Python | logic_ops | advanced | Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 97
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 97
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
16,297,709 | en | Python | logic_ops | advanced | Write a function that determines if the number 86 is prime in Python. | def is_prime():
n = 86
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 86 is prime in Python.
### Response:
def is_prime():
n = 86
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
21,343,490 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
41,438,654 | en | Unity | array_ops | intermediate | 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);
} |
40,475,164 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2062 високосным. | public bool IsLeap() {
int y = 2062;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2062 високосным.
### Response:
public bool IsLeap() {
int y = 2062;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
312,397 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 7326. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7326));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 7326.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(7326));
} |
1,653,995 | kk | Unity | var_decl | beginner | Unity тілінде 682451 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 682451; | ### Instruction:
Unity тілінде 682451 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 682451; |
26,132,131 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
518,114 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 4052-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4052)); | ### Instruction:
C# тілінде 1-ден 4052-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4052)); |
25,687,892 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
98,421,700 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 114 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 114;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 114 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 114;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
97,227,080 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
48,535,854 | 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] |
98,024,752 | en | C# | logic_ops | advanced | Write a function that determines if the number 388 is prime in C#. | public bool IsPrime() {
int n = 388;
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 388 is prime in C#.
### Response:
public bool IsPrime() {
int n = 388;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
53,903,087 | kk | Java | string_ops | intermediate | Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.