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 |
|---|---|---|---|---|---|---|---|
69,161,669 | kk | Java | logic_ops | advanced | Java тилінде 174 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 174;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 174 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 174;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
86,679,185 | ru | Unity | array_ops | advanced | Напишите на 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;
} |
51,595,810 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 7 is prime in Unity. | public bool IsPrime() {
int n = 7;
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 7 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 7;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
91,315 | kk | Java | var_decl | beginner | Java тілінде 55858 мәнімен total айнымалысын қалай жариялауға болады? | int total = 55858; | ### Instruction:
Java тілінде 55858 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 55858; |
43,798,671 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 2022 високосным. | public bool IsLeap() {
int y = 2022;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2022 високосным.
### Response:
public bool IsLeap() {
int y = 2022;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,558,020 | ru | C# | var_decl | beginner | Как объявить переменную size со значением 661089 в C#? | int size = 661089; | ### Instruction:
Как объявить переменную size со значением 661089 в C#?
### Response:
int size = 661089; |
711,667 | ru | C# | var_decl | beginner | Как объявить переменную speed со значением 766769 в C#? | int speed = 766769; | ### Instruction:
Как объявить переменную speed со значением 766769 в C#?
### Response:
int speed = 766769; |
98,956,212 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 310 простым. | def is_prime():
n = 310
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 310 простым.
### Response:
def is_prime():
n = 310
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
88,891,334 | kk | C# | logic_ops | advanced | C# тилінде 82 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 82;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 82 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 82;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
54,301 | en | Python | var_decl | beginner | How to declare a variable x with value 558464 in Python? | x = 558464 | ### Instruction:
How to declare a variable x with value 558464 in Python?
### Response:
x = 558464 |
2,496,846 | en | Java | var_decl | beginner | How to declare a variable weight with value 548060 in Java? | int weight = 548060; | ### Instruction:
How to declare a variable weight with value 548060 in Java?
### Response:
int weight = 548060; |
37,157,610 | 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);
} |
97,468,473 | kk | C++ | logic_ops | intermediate | C++ тилінде 1930 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1930;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1930 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1930;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
80,466,115 | en | C# | string_ops | advanced | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
274,009 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 8750-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8750)); | ### Instruction:
C# тілінде 1-ден 8750-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8750)); |
84,254,152 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
511,036 | en | Java | var_decl | beginner | How to declare a variable y with value 241555 in Java? | int y = 241555; | ### Instruction:
How to declare a variable y with value 241555 in Java?
### Response:
int y = 241555; |
95,156,897 | 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;
} |
79,848 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 3926-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(3926));
} | ### Instruction:
Unity тілінде 1-ден 3926-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(3926));
} |
265,333 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8428. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8428)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 8428.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8428)); |
52,985,584 | 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); |
42,269,316 | en | JavaScript | string_ops | intermediate | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
49,654,200 | 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;
} |
42,142,137 | 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;
} |
322,166 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 3144. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3144)) | ### Instruction:
Write a function in Python that calculates the factorial of 3144.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3144)) |
46,504,509 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
66,100,795 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 317 is prime in JavaScript. | function isPrime() {
let n = 317;
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 317 is prime in JavaScript.
### Response:
function isPrime() {
let n = 317;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
53,841,878 | ru | 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;
} |
3,426,862 | ru | Unity | var_decl | beginner | Как объявить переменную level со значением 552962 в Unity? | int level = 552962; | ### Instruction:
Как объявить переменную level со значением 552962 в Unity?
### Response:
int level = 552962; |
99,060,437 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1961 високосным. | function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1961 високосным.
### Response:
function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
42,216,549 | 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;
} |
4,250,063 | en | Python | var_decl | beginner | How to declare a variable amount with value 416164 in Python? | amount = 416164 | ### Instruction:
How to declare a variable amount with value 416164 in Python?
### Response:
amount = 416164 |
89,893,174 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
44,315,781 | 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] |
38,092,616 | 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;
} |
3,750,069 | ru | Python | var_decl | beginner | Как объявить переменную speed со значением 220478 в Python? | speed = 220478 | ### Instruction:
Как объявить переменную speed со значением 220478 в Python?
### Response:
speed = 220478 |
25,449,844 | 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;
} |
4,915,263 | ru | Java | var_decl | beginner | Как объявить переменную total со значением 672344 в Java? | int total = 672344; | ### Instruction:
Как объявить переменную total со значением 672344 в Java?
### Response:
int total = 672344; |
3,341,588 | kk | C# | var_decl | beginner | C# тілінде 161211 мәнімен total айнымалысын қалай жариялауға болады? | int total = 161211; | ### Instruction:
C# тілінде 161211 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 161211; |
67,143,857 | kk | Unity | logic_ops | advanced | Unity тилінде 392 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 392;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 392 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 392;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
242,107 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 1916. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1916) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 1916.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1916) << std::endl; |
56,873,369 | en | C++ | array_ops | intermediate | Write a function that reverses a list in C++. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C++.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,203,048 | en | Unity | var_decl | beginner | How to declare a variable level with value 558513 in Unity? | int level = 558513; | ### Instruction:
How to declare a variable level with value 558513 in Unity?
### Response:
int level = 558513; |
64,277,062 | 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аеёиоуыэюя') |
86,841,750 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 165 простым. | public bool IsPrime() {
int n = 165;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 165 простым.
### Response:
public bool IsPrime() {
int n = 165;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
22,999,390 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
542,331 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 6619. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6619) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 6619.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6619) << std::endl; |
1,537,470 | kk | Java | var_decl | beginner | Java тілінде 192868 мәнімен x айнымалысын қалай жариялауға болады? | int x = 192868; | ### Instruction:
Java тілінде 192868 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 192868; |
19,696,225 | en | C++ | logic_ops | advanced | Write a function that determines if the number 287 is prime in C++. | public bool IsPrime() {
int n = 287;
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 287 is prime in C++.
### Response:
public bool IsPrime() {
int n = 287;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
63,504,535 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2063 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2063;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2063 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2063;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
25,058,629 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 139 простым. | public bool IsPrime() {
int n = 139;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 139 простым.
### Response:
public bool IsPrime() {
int n = 139;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,744,955 | kk | C++ | var_decl | beginner | C++ тілінде 959931 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 959931; | ### Instruction:
C++ тілінде 959931 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 959931; |
71,371 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 2463. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2463)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 2463.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2463)); |
637,518 | en | C++ | var_decl | beginner | How to declare a variable total with value 990097 in C++? | int total = 990097; | ### Instruction:
How to declare a variable total with value 990097 in C++?
### Response:
int total = 990097; |
48,102,892 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
85,108,940 | en | Java | logic_ops | intermediate | Write logic to check if the year 1923 is a leap year in Java. | 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 Java.
### Response:
public bool IsLeap() {
int y = 1923;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
329,951 | kk | Java | factorial | advanced | Java тілінде 2063 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2063)); | ### Instruction:
Java тілінде 2063 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2063)); |
16,176,365 | kk | Unity | logic_ops | intermediate | Unity тилінде 2057 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2057;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2057 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2057;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
94,770,422 | en | Java | array_ops | intermediate | 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;
} |
54,500,262 | kk | C++ | string_ops | intermediate | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,693,621 | en | Java | var_decl | beginner | How to declare a variable y with value 773625 in Java? | int y = 773625; | ### Instruction:
How to declare a variable y with value 773625 in Java?
### Response:
int y = 773625; |
87,268,238 | en | Java | array_ops | intermediate | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
10,945 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 259. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(259)); | ### Instruction:
Write a function in Java that calculates the factorial of 259.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(259)); |
4,311,813 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 928105 in JavaScript? | let level = 928105; | ### Instruction:
How to declare a variable level with value 928105 in JavaScript?
### Response:
let level = 928105; |
81,539,251 | kk | C++ | array_ops | advanced | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
51,488,482 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 350 простым. | public bool IsPrime() {
int n = 350;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 350 простым.
### Response:
public bool IsPrime() {
int n = 350;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
89,516,086 | 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();
} |
1,281,682 | en | Java | var_decl | beginner | How to declare a variable size with value 295778 in Java? | int size = 295778; | ### Instruction:
How to declare a variable size with value 295778 in Java?
### Response:
int size = 295778; |
85,021,289 | kk | Unity | logic_ops | intermediate | Unity тилінде 18 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 18;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 18 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 18;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
76,645,555 | kk | C++ | logic_ops | intermediate | C++ тилінде 298 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 298;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 298 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 298;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,324,416 | en | Python | var_decl | beginner | How to declare a variable index with value 110094 in Python? | index = 110094 | ### Instruction:
How to declare a variable index with value 110094 in Python?
### Response:
index = 110094 |
18,563,902 | 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;
} |
49,767,179 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 256 is prime in C++. | public bool IsPrime() {
int n = 256;
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 256 is prime in C++.
### Response:
public bool IsPrime() {
int n = 256;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,555,855 | en | JavaScript | var_decl | beginner | How to declare a variable value with value 383400 in JavaScript? | let value = 383400; | ### Instruction:
How to declare a variable value with value 383400 in JavaScript?
### Response:
let value = 383400; |
42,500,076 | 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;
} |
4,731,939 | ru | Python | var_decl | beginner | Как объявить переменную count со значением 242309 в Python? | count = 242309 | ### Instruction:
Как объявить переменную count со значением 242309 в Python?
### Response:
count = 242309 |
3,661,054 | kk | C# | var_decl | beginner | C# тілінде 814363 мәнімен value айнымалысын қалай жариялауға болады? | int value = 814363; | ### Instruction:
C# тілінде 814363 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 814363; |
1,509,615 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 94162 в C++? | int total = 94162; | ### Instruction:
Как объявить переменную total со значением 94162 в C++?
### Response:
int total = 94162; |
524,736 | kk | Unity | factorial | advanced | Unity тілінде 6364 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6364));
} | ### Instruction:
Unity тілінде 6364 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6364));
} |
35,817,903 | en | C++ | string_ops | advanced | Write a function that converts a string to uppercase in C++. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C++.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
89,160,102 | 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);
} |
1,259,901 | en | Unity | var_decl | beginner | How to declare a variable level with value 663517 in Unity? | int level = 663517; | ### Instruction:
How to declare a variable level with value 663517 in Unity?
### Response:
int level = 663517; |
20,444,563 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
26,465,431 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
39,311,995 | 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;
} |
15,908,677 | en | Unity | string_ops | intermediate | Write a function that counts vowels in a text in Unity. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
28,919 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 9510. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9510)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 9510.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9510)) |
4,685,744 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 574933 в Unity? | int value = 574933; | ### Instruction:
Как объявить переменную value со значением 574933 в Unity?
### Response:
int value = 574933; |
3,006,657 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 283415 в Python? | amount = 283415 | ### Instruction:
Как объявить переменную amount со значением 283415 в Python?
### Response:
amount = 283415 |
81,691,743 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 329 простым. | public bool IsPrime() {
int n = 329;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 329 простым.
### Response:
public bool IsPrime() {
int n = 329;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
847,050 | kk | Unity | var_decl | beginner | Unity тілінде 510693 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 510693; | ### Instruction:
Unity тілінде 510693 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 510693; |
83,251,354 | en | Java | logic_ops | advanced | Write logic to check if the year 2045 is a leap year in Java. | public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2045 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,034,574 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 400891 в C++? | int health = 400891; | ### Instruction:
Как объявить переменную health со значением 400891 в C++?
### Response:
int health = 400891; |
44,327,294 | kk | Python | logic_ops | intermediate | Python тилінде 452 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 452
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 452 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 452
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
81,630,788 | kk | 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;
} |
57,590,789 | 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;
} |
73,824,045 | 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;
} |
89,338,842 | 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();
} |
13,052,777 | ru | 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;
} |
4,170,151 | ru | Java | var_decl | beginner | Как объявить переменную y со значением 359531 в Java? | int y = 359531; | ### Instruction:
Как объявить переменную y со значением 359531 в Java?
### Response:
int y = 359531; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.