id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
93,333,932 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,112,948 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 208571 in JavaScript? | let y = 208571; | ### Instruction:
How to declare a variable y with value 208571 in JavaScript?
### Response:
let y = 208571; |
1,036,969 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 682221 в C++? | int value = 682221; | ### Instruction:
Как объявить переменную value со значением 682221 в C++?
### Response:
int value = 682221; |
90,412,689 | 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;
} |
38,721,047 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 400 простым. | public bool IsPrime() {
int n = 400;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 400 простым.
### Response:
public bool IsPrime() {
int n = 400;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
61,433,263 | kk | Unity | logic_ops | advanced | Unity тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2038 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2038;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
84,202,093 | 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;
} |
17,185,032 | 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;
} |
87,498,550 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 382 is prime in C++. | public bool IsPrime() {
int n = 382;
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 382 is prime in C++.
### Response:
public bool IsPrime() {
int n = 382;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
72,305,124 | en | Python | logic_ops | intermediate | Write logic to check if the year 1975 is a leap year in Python. | def is_leap():
year = 1975
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1975 is a leap year in Python.
### Response:
def is_leap():
year = 1975
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
40,864,657 | 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();
} |
1,786,154 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 636948 в JavaScript? | let score = 636948; | ### Instruction:
Как объявить переменную score со значением 636948 в JavaScript?
### Response:
let score = 636948; |
4,010,758 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 521641 в Java? | int weight = 521641; | ### Instruction:
Как объявить переменную weight со значением 521641 в Java?
### Response:
int weight = 521641; |
41,659,080 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
2,633,194 | kk | C# | var_decl | beginner | C# тілінде 838777 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 838777; | ### Instruction:
C# тілінде 838777 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 838777; |
41,286,290 | 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(); |
3,601,681 | ru | C# | var_decl | beginner | Как объявить переменную x со значением 513584 в C#? | int x = 513584; | ### Instruction:
Как объявить переменную x со значением 513584 в C#?
### Response:
int x = 513584; |
1,621,206 | kk | C# | var_decl | beginner | C# тілінде 561569 мәнімен score айнымалысын қалай жариялауға болады? | int score = 561569; | ### Instruction:
C# тілінде 561569 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 561569; |
1,941,725 | kk | Python | var_decl | beginner | Python тілінде 728689 мәнімен count айнымалысын қалай жариялауға болады? | count = 728689 | ### Instruction:
Python тілінде 728689 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 728689 |
71,296,643 | 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;
} |
2,239,357 | ru | Python | var_decl | beginner | Как объявить переменную data со значением 695733 в Python? | data = 695733 | ### Instruction:
Как объявить переменную data со значением 695733 в Python?
### Response:
data = 695733 |
1,723 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 4199. | int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(4199) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 4199.
### Response:
int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(4199) << std::endl; |
4,274,464 | en | Python | var_decl | beginner | How to declare a variable score with value 291331 in Python? | score = 291331 | ### Instruction:
How to declare a variable score with value 291331 in Python?
### Response:
score = 291331 |
55,983,493 | 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аеёиоуыэюя') |
42,519,243 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
20,512,021 | 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); |
4,478,891 | en | JavaScript | var_decl | beginner | How to declare a variable weight with value 340193 in JavaScript? | let weight = 340193; | ### Instruction:
How to declare a variable weight with value 340193 in JavaScript?
### Response:
let weight = 340193; |
32,597,128 | 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; |
138,420 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 8713. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8713)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 8713.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8713)); |
72,153,477 | en | Python | logic_ops | advanced | Write a function that determines if the number 285 is prime in Python. | def is_prime():
n = 285
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 285 is prime in Python.
### Response:
def is_prime():
n = 285
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
99,865,064 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
684,826 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 272. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(272) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 272.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(272) << std::endl; |
46,122,328 | kk | Unity | logic_ops | advanced | Unity тилінде 1920 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1920;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1920 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1920;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
65,326,132 | 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;
} |
188,766 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 3828. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3828)); | ### Instruction:
Write a function in Java that calculates the factorial of 3828.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3828)); |
31,735,636 | en | Java | array_ops | advanced | Write a function that filters only even numbers from a list in Java. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Java.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
4,696,914 | en | Unity | var_decl | beginner | How to declare a variable health with value 822044 in Unity? | int health = 822044; | ### Instruction:
How to declare a variable health with value 822044 in Unity?
### Response:
int health = 822044; |
1,333,010 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 456189 мәнімен y айнымалысын қалай жариялауға болады? | let y = 456189; | ### Instruction:
JavaScript тілінде 456189 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
let y = 456189; |
13,093,173 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1992 is a leap year in JavaScript. | function isLeap() {
let y = 1992;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1992 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1992;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,605,529 | ru | Python | var_decl | beginner | Как объявить переменную rate со значением 559155 в Python? | rate = 559155 | ### Instruction:
Как объявить переменную rate со значением 559155 в Python?
### Response:
rate = 559155 |
1,252,098 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 113908 в C#? | int health = 113908; | ### Instruction:
Как объявить переменную health со значением 113908 в C#?
### Response:
int health = 113908; |
75,073,924 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 2042 високосным. | def is_leap():
year = 2042
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2042 високосным.
### Response:
def is_leap():
year = 2042
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
14,120,485 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2073 високосным. | function isLeap() {
let y = 2073;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2073 високосным.
### Response:
function isLeap() {
let y = 2073;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
2,843,426 | ru | C++ | var_decl | beginner | Как объявить переменную index со значением 393428 в C++? | int index = 393428; | ### Instruction:
Как объявить переменную index со значением 393428 в C++?
### Response:
int index = 393428; |
28,094,135 | 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;
} |
49,615,518 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
35,127,624 | en | Python | array_ops | intermediate | Write a function that filters only even numbers from a list in Python. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Write a function that filters only even numbers from a list in Python.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
4,422,742 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 653361 в C++? | int total = 653361; | ### Instruction:
Как объявить переменную total со значением 653361 в C++?
### Response:
int total = 653361; |
77,537,691 | 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); |
28,410,971 | 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;
} |
97,394,777 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
15,572,628 | 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;
} |
30,198,178 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 75 простым. | public bool IsPrime() {
int n = 75;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 75 простым.
### Response:
public bool IsPrime() {
int n = 75;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
639,236 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 7328. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7328));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 7328.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7328));
} |
16,601,920 | kk | C# | string_ops | advanced | 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;
} |
24,087,450 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
570,518 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 5611. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(5611)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 5611.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(5611)); |
54,064,624 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 1943 високосным. | public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1943 високосным.
### Response:
public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
586,686 | en | Unity | var_decl | beginner | How to declare a variable data with value 982590 in Unity? | int data = 982590; | ### Instruction:
How to declare a variable data with value 982590 in Unity?
### Response:
int data = 982590; |
2,032,242 | kk | C++ | var_decl | beginner | C++ тілінде 34224 мәнімен y айнымалысын қалай жариялауға болады? | int y = 34224; | ### Instruction:
C++ тілінде 34224 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 34224; |
93,190,892 | 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) |
397,455 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 1840. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1840) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 1840.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1840) << std::endl; |
362,573 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 9706. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(9706)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 9706.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(9706)); |
14,584,445 | en | Python | logic_ops | intermediate | Write a function that determines if the number 373 is prime in Python. | def is_prime():
n = 373
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 373 is prime in Python.
### Response:
def is_prime():
n = 373
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,467,246 | en | Java | var_decl | beginner | How to declare a variable index with value 567357 in Java? | int index = 567357; | ### Instruction:
How to declare a variable index with value 567357 in Java?
### Response:
int index = 567357; |
85,292,700 | 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();
} |
62,162,554 | en | C# | logic_ops | intermediate | Write logic to check if the year 2087 is a leap year in C#. | public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2087 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2087;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,230,548 | en | Unity | var_decl | beginner | How to declare a variable level with value 411270 in Unity? | int level = 411270; | ### Instruction:
How to declare a variable level with value 411270 in Unity?
### Response:
int level = 411270; |
84,122,155 | 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;
} |
83,672,181 | ru | C# | string_ops | advanced | Напишите на C# функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C# функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
94,048,634 | kk | Unity | logic_ops | intermediate | Unity тилінде 61 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 61;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 61 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 61;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,681,450 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 120040 в C++? | int amount = 120040; | ### Instruction:
Как объявить переменную amount со значением 120040 в C++?
### Response:
int amount = 120040; |
4,193,013 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 415514 мәнімен health айнымалысын қалай жариялауға болады? | let health = 415514; | ### Instruction:
JavaScript тілінде 415514 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
let health = 415514; |
31,797,728 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
58,234,164 | en | Java | logic_ops | intermediate | Write logic to check if the year 2065 is a leap year in Java. | public bool IsLeap() {
int y = 2065;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2065 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2065;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
385,815 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 3744. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3744)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 3744.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3744)); |
64,168,231 | kk | Java | string_ops | intermediate | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,572,621 | kk | Python | var_decl | beginner | Python тілінде 212345 мәнімен size айнымалысын қалай жариялауға болады? | size = 212345 | ### Instruction:
Python тілінде 212345 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
size = 212345 |
1,702,384 | kk | C# | var_decl | beginner | C# тілінде 235368 мәнімен data айнымалысын қалай жариялауға болады? | int data = 235368; | ### Instruction:
C# тілінде 235368 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 235368; |
569,517 | kk | C# | var_decl | beginner | C# тілінде 895901 мәнімен score айнымалысын қалай жариялауға болады? | int score = 895901; | ### Instruction:
C# тілінде 895901 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 895901; |
76,818,470 | kk | Java | logic_ops | advanced | Java тилінде 389 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 389;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 389 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 389;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
12,224,005 | en | Unity | string_ops | intermediate | Write a function that checks if a string is a palindrome in Unity. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Unity.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
6,751 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 1728-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(1728) << std::endl; | ### Instruction:
C++ тілінде 1-ден 1728-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int sum_to_n(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
std::cout << sum_to_n(1728) << std::endl; |
23,083,611 | 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;
} |
15,694,341 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 2094 високосным. | public bool IsLeap() {
int y = 2094;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2094 високосным.
### Response:
public bool IsLeap() {
int y = 2094;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
66,777,998 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2065 високосным. | public bool IsLeap() {
int y = 2065;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2065 високосным.
### Response:
public bool IsLeap() {
int y = 2065;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
53,725,011 | 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;
} |
466,840 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 1421. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1421)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 1421.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1421)); |
10,660,434 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
67,236,884 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 1966 високосным. | function isLeap() {
let y = 1966;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1966 високосным.
### Response:
function isLeap() {
let y = 1966;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
83,577,548 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 299 is prime in C++. | public bool IsPrime() {
int n = 299;
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 299 is prime in C++.
### Response:
public bool IsPrime() {
int n = 299;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
343,238 | ru | Python | var_decl | beginner | Как объявить переменную y со значением 830670 в Python? | y = 830670 | ### Instruction:
Как объявить переменную y со значением 830670 в Python?
### Response:
y = 830670 |
32,182 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 8111. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8111)); | ### Instruction:
Write a function in Java that calculates the factorial of 8111.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8111)); |
2,406,937 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 85109 в Python? | health = 85109 | ### Instruction:
Как объявить переменную health со значением 85109 в Python?
### Response:
health = 85109 |
31,918,011 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2021 is a leap year in C++. | public bool IsLeap() {
int y = 2021;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2021 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2021;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,000,782 | kk | C# | logic_ops | intermediate | C# тилінде 2009 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2009 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2009;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
79,296,937 | en | C++ | array_ops | advanced | 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);
} |
62,050,222 | kk | C++ | array_ops | intermediate | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
44,176,964 | 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;
} |
96,304,300 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.