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 |
|---|---|---|---|---|---|---|---|
33,508,905 | ru | 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);
} |
2,514,044 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 690734 в Python? | health = 690734 | ### Instruction:
Как объявить переменную health со значением 690734 в Python?
### Response:
health = 690734 |
205,966 | kk | Python | factorial | advanced | Python тілінде 5288 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(5288)) | ### Instruction:
Python тілінде 5288 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(5288)) |
80,368,154 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,773,418 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 702060 в Unity? | int x = 702060; | ### Instruction:
Как объявить переменную x со значением 702060 в Unity?
### Response:
int x = 702060; |
4,865,909 | en | C# | var_decl | beginner | How to declare a variable amount with value 538277 in C#? | int amount = 538277; | ### Instruction:
How to declare a variable amount with value 538277 in C#?
### Response:
int amount = 538277; |
3,025,156 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 509651 в Java? | int x = 509651; | ### Instruction:
Как объявить переменную x со значением 509651 в Java?
### Response:
int x = 509651; |
96,187,269 | en | JavaScript | string_ops | intermediate | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,785,942 | kk | Unity | var_decl | beginner | Unity тілінде 971496 мәнімен result айнымалысын қалай жариялауға болады? | int result = 971496; | ### Instruction:
Unity тілінде 971496 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 971496; |
87,330,867 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
44,281,337 | en | Java | logic_ops | intermediate | Write logic to check if the year 1916 is a leap year in Java. | public bool IsLeap() {
int y = 1916;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1916 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1916;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
309,945 | kk | C# | factorial | advanced | C# тілінде 3626 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3626)); | ### Instruction:
C# тілінде 3626 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3626)); |
55,823,346 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 398 простым. | public bool IsPrime() {
int n = 398;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 398 простым.
### Response:
public bool IsPrime() {
int n = 398;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
794,185 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 77637 в JavaScript? | let score = 77637; | ### Instruction:
Как объявить переменную score со значением 77637 в JavaScript?
### Response:
let score = 77637; |
48,621,723 | 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;
} |
763,359 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 1462. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1462)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 1462.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1462)); |
3,471,067 | kk | Java | var_decl | beginner | Java тілінде 838304 мәнімен health айнымалысын қалай жариялауға болады? | int health = 838304; | ### Instruction:
Java тілінде 838304 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 838304; |
3,405,049 | ru | JavaScript | var_decl | beginner | Как объявить переменную health со значением 85167 в JavaScript? | let health = 85167; | ### Instruction:
Как объявить переменную health со значением 85167 в JavaScript?
### Response:
let health = 85167; |
2,780,876 | en | Java | var_decl | beginner | How to declare a variable data with value 810774 in Java? | int data = 810774; | ### Instruction:
How to declare a variable data with value 810774 in Java?
### Response:
int data = 810774; |
76,569,147 | kk | Python | array_ops | intermediate | Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
59,224,812 | en | C# | logic_ops | advanced | Write a function that determines if the number 389 is prime in C#. | 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:
Write a function that determines if the number 389 is prime in C#.
### 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;
} |
69,419,970 | en | Python | logic_ops | intermediate | Write a function that determines if the number 133 is prime in Python. | def is_prime():
n = 133
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 133 is prime in Python.
### Response:
def is_prime():
n = 133
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,217,244 | en | C# | var_decl | beginner | How to declare a variable y with value 36059 in C#? | int y = 36059; | ### Instruction:
How to declare a variable y with value 36059 in C#?
### Response:
int y = 36059; |
3,225,830 | kk | Java | var_decl | beginner | Java тілінде 957598 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 957598; | ### Instruction:
Java тілінде 957598 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 957598; |
3,263,967 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 487433 в Java? | int count = 487433; | ### Instruction:
Как объявить переменную count со значением 487433 в Java?
### Response:
int count = 487433; |
65,197,551 | kk | 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;
} |
12,425 | kk | C++ | func_def | intermediate | C++ тілінде score қабылдап, оны екі еселейтін convert функциясын жаз. | int convert(int score) {
return score * 2;
} | ### Instruction:
C++ тілінде score қабылдап, оны екі еселейтін convert функциясын жаз.
### Response:
int convert(int score) {
return score * 2;
} |
2,221,062 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 83343 in JavaScript? | let limit = 83343; | ### Instruction:
How to declare a variable limit with value 83343 in JavaScript?
### Response:
let limit = 83343; |
342,959 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 140752 в JavaScript? | let total = 140752; | ### Instruction:
Как объявить переменную total со значением 140752 в JavaScript?
### Response:
let total = 140752; |
55,756,784 | kk | C++ | logic_ops | advanced | 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);
} |
610,573 | en | C++ | var_decl | beginner | How to declare a variable speed with value 766716 in C++? | int speed = 766716; | ### Instruction:
How to declare a variable speed with value 766716 in C++?
### Response:
int speed = 766716; |
294,128 | en | Python | var_decl | beginner | How to declare a variable speed with value 597832 in Python? | speed = 597832 | ### Instruction:
How to declare a variable speed with value 597832 in Python?
### Response:
speed = 597832 |
49,952,823 | kk | 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;
} |
41,218,875 | kk | Java | string_ops | advanced | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,040,291 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 694508 в Unity? | int score = 694508; | ### Instruction:
Как объявить переменную score со значением 694508 в Unity?
### Response:
int score = 694508; |
57,106,012 | en | Unity | string_ops | advanced | 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;
} |
2,958,143 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 87888 в Unity? | int x = 87888; | ### Instruction:
Как объявить переменную x со значением 87888 в Unity?
### Response:
int x = 87888; |
34,670,722 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1962 is a leap year in Unity. | public bool IsLeap() {
int y = 1962;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1962 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1962;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
36,906,132 | 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); |
95,413,251 | 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();
} |
22,353,192 | kk | Java | logic_ops | advanced | Java тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1949;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1949;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,935,852 | ru | Python | var_decl | beginner | Как объявить переменную count со значением 544179 в Python? | count = 544179 | ### Instruction:
Как объявить переменную count со значением 544179 в Python?
### Response:
count = 544179 |
1,196,295 | en | JavaScript | var_decl | beginner | How to declare a variable index with value 498682 in JavaScript? | let index = 498682; | ### Instruction:
How to declare a variable index with value 498682 in JavaScript?
### Response:
let index = 498682; |
4,112,996 | en | C# | var_decl | beginner | How to declare a variable limit with value 435163 in C#? | int limit = 435163; | ### Instruction:
How to declare a variable limit with value 435163 in C#?
### Response:
int limit = 435163; |
11,321,537 | en | Java | array_ops | advanced | 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);
} |
4,472,828 | kk | Java | var_decl | beginner | Java тілінде 149318 мәнімен score айнымалысын қалай жариялауға болады? | int score = 149318; | ### Instruction:
Java тілінде 149318 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 149318; |
88,172,850 | 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;
} |
12,827,367 | en | Python | string_ops | advanced | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
644,160 | kk | C# | factorial | advanced | C# тілінде 447 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(447)); | ### Instruction:
C# тілінде 447 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(447)); |
40,580,682 | ru | C++ | string_ops | intermediate | Напишите на C++ функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
34,729,694 | en | C# | string_ops | intermediate | Write a function that checks if a string is a palindrome in C#. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C#.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
596,305 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 6865. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6865));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 6865.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6865));
} |
97,994,793 | ru | Java | string_ops | advanced | Напишите на 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;
} |
3,377,648 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 327519 мәнімен score айнымалысын қалай жариялауға болады? | let score = 327519; | ### Instruction:
JavaScript тілінде 327519 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
let score = 327519; |
83,026,914 | 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);
} |
63,796,462 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
19,576,271 | 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();
} |
70,961,060 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2024 високосным. | function isLeap() {
let y = 2024;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2024 високосным.
### Response:
function isLeap() {
let y = 2024;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
59,114,231 | kk | Java | logic_ops | intermediate | Java тилінде 270 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 270 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,811,932 | kk | C++ | var_decl | beginner | C++ тілінде 338361 мәнімен count айнымалысын қалай жариялауға болады? | int count = 338361; | ### Instruction:
C++ тілінде 338361 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 338361; |
619,633 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 9902-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9902));
} | ### Instruction:
Unity тілінде 1-ден 9902-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9902));
} |
80,787,334 | 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);
} |
27,769,843 | 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();
} |
3,631,665 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 183292 в Java? | int count = 183292; | ### Instruction:
Как объявить переменную count со значением 183292 в Java?
### Response:
int count = 183292; |
57,034,626 | kk | Unity | string_ops | advanced | Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
38,849 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 2722. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2722)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 2722.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(2722)); |
33,848,052 | ru | 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);
} |
435,205 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 8918-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8918)); | ### Instruction:
JavaScript тілінде 1-ден 8918-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8918)); |
81,663,470 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
14,675,942 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
2,464,915 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 384360 в Unity? | int rate = 384360; | ### Instruction:
Как объявить переменную rate со значением 384360 в Unity?
### Response:
int rate = 384360; |
70,475,490 | 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();
} |
65,835,807 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
3,190,679 | en | C++ | var_decl | beginner | How to declare a variable weight with value 310060 in C++? | int weight = 310060; | ### Instruction:
How to declare a variable weight with value 310060 in C++?
### Response:
int weight = 310060; |
70,958,500 | 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;
} |
667,604 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 8365. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8365)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 8365.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8365)); |
1,840,522 | en | C# | var_decl | beginner | How to declare a variable offset with value 309043 in C#? | int offset = 309043; | ### Instruction:
How to declare a variable offset with value 309043 in C#?
### Response:
int offset = 309043; |
56,346,132 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 498 простым. | public bool IsPrime() {
int n = 498;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 498 простым.
### Response:
public bool IsPrime() {
int n = 498;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
28,648,972 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1993 is a leap year in JavaScript. | function isLeap() {
let y = 1993;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1993 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1993;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
31,663,116 | 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;
} |
38,331,520 | ru | 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); |
96,056,464 | ru | 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);
} |
66,481,915 | kk | C++ | logic_ops | intermediate | C++ тилінде 51 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 51;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 51 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 51;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
63,296,171 | en | JavaScript | array_ops | advanced | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
72,613,394 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
40,441,884 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 2038 високосным. | def is_leap():
year = 2038
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2038 високосным.
### Response:
def is_leap():
year = 2038
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
96,628,614 | 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();
} |
47,467,805 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 290 простым. | public bool IsPrime() {
int n = 290;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 290 простым.
### Response:
public bool IsPrime() {
int n = 290;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
125,534 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 9463. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9463)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 9463.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9463)) |
4,609,310 | en | Java | var_decl | beginner | How to declare a variable x with value 80835 in Java? | int x = 80835; | ### Instruction:
How to declare a variable x with value 80835 in Java?
### Response:
int x = 80835; |
17,288,294 | kk | Java | logic_ops | intermediate | Java тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,242,632 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
400,422 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 8313. | 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(8313) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 8313.
### 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(8313) << std::endl; |
3,034,672 | en | C++ | var_decl | beginner | How to declare a variable buffer with value 650205 in C++? | int buffer = 650205; | ### Instruction:
How to declare a variable buffer with value 650205 in C++?
### Response:
int buffer = 650205; |
20,185,501 | en | Unity | logic_ops | advanced | Write a function that determines if the number 95 is prime in Unity. | public bool IsPrime() {
int n = 95;
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 95 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 95;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
96,063,542 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
95,349,949 | en | Java | string_ops | advanced | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
391,326 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 7855. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7855)); | ### Instruction:
Write a function in Java that calculates the factorial of 7855.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7855)); |
29,019,164 | 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;
} |
172,227 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 6838. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6838)); | ### Instruction:
Write a function in Java that calculates the factorial of 6838.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6838)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.