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 |
|---|---|---|---|---|---|---|---|
67,517,850 | 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;
} |
4,920,717 | kk | Java | var_decl | beginner | Java тілінде 406826 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 406826; | ### Instruction:
Java тілінде 406826 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 406826; |
65,536,964 | 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);
} |
65,966,609 | kk | 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;
} |
69,260,706 | kk | Java | logic_ops | intermediate | Java тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
54,903,060 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
40,597,579 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
899,563 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 130650 в Unity? | int index = 130650; | ### Instruction:
Как объявить переменную index со значением 130650 в Unity?
### Response:
int index = 130650; |
116,338 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 3222-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3222)); | ### Instruction:
C# тілінде 1-ден 3222-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3222)); |
10,604,935 | kk | 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);
} |
55,504,096 | 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;
} |
2,388,560 | en | Unity | var_decl | beginner | How to declare a variable timer with value 720471 in Unity? | int timer = 720471; | ### Instruction:
How to declare a variable timer with value 720471 in Unity?
### Response:
int timer = 720471; |
4,450,150 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 103582 в C++? | int timer = 103582; | ### Instruction:
Как объявить переменную timer со значением 103582 в C++?
### Response:
int timer = 103582; |
96,134,433 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 2023 високосным. | public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2023 високосным.
### Response:
public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,222,525 | ru | C# | var_decl | beginner | Как объявить переменную count со значением 97511 в C#? | int count = 97511; | ### Instruction:
Как объявить переменную count со значением 97511 в C#?
### Response:
int count = 97511; |
351,907 | kk | Unity | var_decl | beginner | Unity тілінде 483655 мәнімен result айнымалысын қалай жариялауға болады? | int result = 483655; | ### Instruction:
Unity тілінде 483655 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 483655; |
13,703,839 | ru | 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;
} |
95,849,770 | 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;
} |
56,099,362 | 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] |
64,168,716 | en | C++ | logic_ops | advanced | Write a function that determines if the number 326 is prime in C++. | public bool IsPrime() {
int n = 326;
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 326 is prime in C++.
### Response:
public bool IsPrime() {
int n = 326;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
93,360,399 | kk | Unity | array_ops | advanced | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
231,701 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 5286. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5286)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 5286.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5286)); |
3,806,067 | en | Python | var_decl | beginner | How to declare a variable rate with value 877052 in Python? | rate = 877052 | ### Instruction:
How to declare a variable rate with value 877052 in Python?
### Response:
rate = 877052 |
94,852,603 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 65 is prime in Unity. | public bool IsPrime() {
int n = 65;
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 65 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 65;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
74,991,703 | 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;
} |
386,684 | kk | C++ | factorial | advanced | C++ тілінде 1856 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1856) << std::endl; | ### Instruction:
C++ тілінде 1856 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1856) << std::endl; |
1,147,801 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 521203 в Python? | limit = 521203 | ### Instruction:
Как объявить переменную limit со значением 521203 в Python?
### Response:
limit = 521203 |
41,352,262 | en | C++ | logic_ops | advanced | Write logic to check if the year 2040 is a leap year in C++. | public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2040 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,955,936 | en | Unity | var_decl | beginner | How to declare a variable limit with value 823552 in Unity? | int limit = 823552; | ### Instruction:
How to declare a variable limit with value 823552 in Unity?
### Response:
int limit = 823552; |
73,060,701 | kk | C++ | logic_ops | intermediate | C++ тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 451;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 451;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
863,566 | ru | C# | var_decl | beginner | Как объявить переменную timer со значением 197913 в C#? | int timer = 197913; | ### Instruction:
Как объявить переменную timer со значением 197913 в C#?
### Response:
int timer = 197913; |
217,200 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 1519-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1519));
} | ### Instruction:
Unity тілінде 1-ден 1519-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1519));
} |
4,600,433 | ru | Java | var_decl | beginner | Как объявить переменную timer со значением 811269 в Java? | int timer = 811269; | ### Instruction:
Как объявить переменную timer со значением 811269 в Java?
### Response:
int timer = 811269; |
60,125,209 | kk | Java | logic_ops | advanced | Java тилінде 1978 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1978;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1978 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1978;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,462,168 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 274467 in C++? | int buffer = 274467; | ### Instruction:
How to declare a variable buffer with value 274467 in C++?
### Response:
int buffer = 274467; |
83,157,430 | kk | C++ | logic_ops | advanced | C++ тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1954;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1954;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,833,959 | 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);
} |
95,274,064 | 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;
} |
14,204,055 | 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;
} |
36,273,274 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
3,112,320 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 358346 в JavaScript? | let weight = 358346; | ### Instruction:
Как объявить переменную weight со значением 358346 в JavaScript?
### Response:
let weight = 358346; |
98,415,576 | en | Unity | array_ops | advanced | Write a function that finds the maximum number in an array in Unity. | 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 Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
70,146,894 | 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();
} |
36,570,142 | ru | 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); |
69,125,792 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 344 простым. | function isPrime() {
let n = 344;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 344 простым.
### Response:
function isPrime() {
let n = 344;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,213,107 | en | JavaScript | var_decl | beginner | How to declare a variable rate with value 868767 in JavaScript? | let rate = 868767; | ### Instruction:
How to declare a variable rate with value 868767 in JavaScript?
### Response:
let rate = 868767; |
4,291,099 | en | C# | var_decl | beginner | How to declare a variable score with value 291164 in C#? | int score = 291164; | ### Instruction:
How to declare a variable score with value 291164 in C#?
### Response:
int score = 291164; |
34,553,642 | 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;
} |
17,629,245 | 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] |
860,666 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 999272 в C++? | int result = 999272; | ### Instruction:
Как объявить переменную result со значением 999272 в C++?
### Response:
int result = 999272; |
58,070,335 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1972 високосным. | function isLeap() {
let y = 1972;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1972 високосным.
### Response:
function isLeap() {
let y = 1972;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
13,427,690 | 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аеёиоуыэюя') |
90,472,814 | 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);
} |
39,034,733 | 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();
} |
54,928 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 69. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(69)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 69.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(69)) |
646,028 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 4882-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4882)) | ### Instruction:
Python тілінде 1-ден 4882-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4882)) |
30,324,699 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
3,404,975 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 346767 в C++? | int size = 346767; | ### Instruction:
Как объявить переменную size со значением 346767 в C++?
### Response:
int size = 346767; |
2,832,881 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 401479 в C#? | int rate = 401479; | ### Instruction:
Как объявить переменную rate со значением 401479 в C#?
### Response:
int rate = 401479; |
147,646 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 9212-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9212)) | ### Instruction:
Python тілінде 1-ден 9212-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9212)) |
2,876,367 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 736385 в Unity? | int x = 736385; | ### Instruction:
Как объявить переменную x со значением 736385 в Unity?
### Response:
int x = 736385; |
44,135,771 | 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();
} |
73,359,936 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 455 простым. | public bool IsPrime() {
int n = 455;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 455 простым.
### Response:
public bool IsPrime() {
int n = 455;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
45,852,829 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
25,034,732 | 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);
} |
46,262,963 | kk | C# | logic_ops | intermediate | C# тилінде 455 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 455;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 455 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 455;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,811,284 | kk | C++ | var_decl | beginner | C++ тілінде 429572 мәнімен y айнымалысын қалай жариялауға болады? | int y = 429572; | ### Instruction:
C++ тілінде 429572 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 429572; |
615,664 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 8692-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8692)); | ### Instruction:
JavaScript тілінде 1-ден 8692-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8692)); |
52,096,925 | kk | Java | array_ops | intermediate | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
20,696,889 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 2017 високосным. | def is_leap():
year = 2017
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2017 високосным.
### Response:
def is_leap():
year = 2017
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
63,031,044 | ru | 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;
} |
21,530,205 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 81 простым. | public bool IsPrime() {
int n = 81;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 81 простым.
### Response:
public bool IsPrime() {
int n = 81;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
54,686,270 | en | Unity | logic_ops | advanced | Write logic to check if the year 1911 is a leap year in Unity. | public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1911 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,693,248 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 743319 in JavaScript? | let y = 743319; | ### Instruction:
How to declare a variable y with value 743319 in JavaScript?
### Response:
let y = 743319; |
64,780,819 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 296 простым. | public bool IsPrime() {
int n = 296;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 296 простым.
### Response:
public bool IsPrime() {
int n = 296;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
59,471,592 | en | Java | string_ops | advanced | Write a function that counts vowels in a text in Java. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Java.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
468,817 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 6034. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(6034)) | ### Instruction:
Write a function in Python that calculates the factorial of 6034.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(6034)) |
79,557,204 | kk | C# | logic_ops | advanced | C# тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,420,722 | kk | Java | var_decl | beginner | Java тілінде 512971 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 512971; | ### Instruction:
Java тілінде 512971 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 512971; |
51,377,651 | en | Java | logic_ops | intermediate | Write logic to check if the year 2079 is a leap year in Java. | public bool IsLeap() {
int y = 2079;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2079 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2079;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
70,861,717 | en | C++ | array_ops | intermediate | 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;
} |
28,345,803 | 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;
} |
197,098 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 3341. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3341)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 3341.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3341)); |
2,602,362 | kk | Python | var_decl | beginner | Python тілінде 367416 мәнімен amount айнымалысын қалай жариялауға болады? | amount = 367416 | ### Instruction:
Python тілінде 367416 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
amount = 367416 |
1,690,627 | en | Python | var_decl | beginner | How to declare a variable data with value 95690 in Python? | data = 95690 | ### Instruction:
How to declare a variable data with value 95690 in Python?
### Response:
data = 95690 |
36,149,690 | kk | 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);
} |
81,942,472 | en | JavaScript | array_ops | advanced | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
434,611 | kk | Unity | var_decl | beginner | Unity тілінде 646218 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 646218; | ### Instruction:
Unity тілінде 646218 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 646218; |
544,130 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 9291. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(9291)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 9291.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(9291)); |
66,901,312 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 10 простым. | public bool IsPrime() {
int n = 10;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 10 простым.
### Response:
public bool IsPrime() {
int n = 10;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,156,785 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 598825 мәнімен index айнымалысын қалай жариялауға болады? | let index = 598825; | ### Instruction:
JavaScript тілінде 598825 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
let index = 598825; |
75,649,545 | kk | C# | logic_ops | intermediate | C# тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1931;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1931;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,989,469 | en | JavaScript | var_decl | beginner | How to declare a variable amount with value 36806 in JavaScript? | let amount = 36806; | ### Instruction:
How to declare a variable amount with value 36806 in JavaScript?
### Response:
let amount = 36806; |
31,325,083 | 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;
} |
1,187,054 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 4898. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4898)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 4898.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4898)); |
32,061,329 | 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;
} |
54,235,659 | en | Unity | logic_ops | advanced | Write a function that determines if the number 242 is prime in Unity. | public bool IsPrime() {
int n = 242;
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 242 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 242;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,095,151 | en | Java | var_decl | beginner | How to declare a variable amount with value 978363 in Java? | int amount = 978363; | ### Instruction:
How to declare a variable amount with value 978363 in Java?
### Response:
int amount = 978363; |
71,154,120 | 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;
} |
1,515,218 | kk | Python | var_decl | beginner | Python тілінде 460806 мәнімен amount айнымалысын қалай жариялауға болады? | amount = 460806 | ### Instruction:
Python тілінде 460806 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
amount = 460806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.