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 |
|---|---|---|---|---|---|---|---|
43,292,684 | kk | Unity | logic_ops | advanced | Unity тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1941;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1941;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,461,283 | en | C# | var_decl | beginner | How to declare a variable speed with value 158460 in C#? | int speed = 158460; | ### Instruction:
How to declare a variable speed with value 158460 in C#?
### Response:
int speed = 158460; |
760,811 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 8109. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(8109)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 8109.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(8109)) |
34,490,093 | 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);
} |
68,306,651 | 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);
} |
33,883,778 | en | C# | string_ops | intermediate | 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();
} |
75,348,418 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 126 простым. | public bool IsPrime() {
int n = 126;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 126 простым.
### Response:
public bool IsPrime() {
int n = 126;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
58,591,852 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 30 простым. | function isPrime() {
let n = 30;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 30 простым.
### Response:
function isPrime() {
let n = 30;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,743,550 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 877425 мәнімен health айнымалысын қалай жариялауға болады? | let health = 877425; | ### Instruction:
JavaScript тілінде 877425 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
let health = 877425; |
20,052,167 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 62 простым. | def is_prime():
n = 62
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 62 простым.
### Response:
def is_prime():
n = 62
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
61,351,308 | kk | Python | logic_ops | intermediate | Python тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2100
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2100 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2100
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
30,723,758 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 44 простым. | public bool IsPrime() {
int n = 44;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 44 простым.
### Response:
public bool IsPrime() {
int n = 44;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,230,163 | kk | Python | var_decl | beginner | Python тілінде 651611 мәнімен value айнымалысын қалай жариялауға болады? | value = 651611 | ### Instruction:
Python тілінде 651611 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
value = 651611 |
615,546 | ru | Python | var_decl | beginner | Как объявить переменную weight со значением 36695 в Python? | weight = 36695 | ### Instruction:
Как объявить переменную weight со значением 36695 в Python?
### Response:
weight = 36695 |
47,019,174 | en | Java | string_ops | advanced | Write a function that counts vowels in a text in Java. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in Java.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
59,209 | kk | Java | factorial | advanced | Java тілінде 8715 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8715)); | ### Instruction:
Java тілінде 8715 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8715)); |
1,106,424 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 1752-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1752)); | ### Instruction:
C# тілінде 1-ден 1752-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1752)); |
592 | ru | C++ | comment | beginner | Как написать комментарий "Готово к работе" в коде на C++? | // Готово к работе | ### Instruction:
Как написать комментарий "Готово к работе" в коде на C++?
### Response:
// Готово к работе |
51,241,980 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 118 простым. | def is_prime():
n = 118
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 118 простым.
### Response:
def is_prime():
n = 118
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
73,021,121 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 2092 високосным. | public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2092 високосным.
### Response:
public bool IsLeap() {
int y = 2092;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
543,398 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 4374. | 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(4374) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 4374.
### 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(4374) << std::endl; |
96,791,525 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
79,047,196 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
66,551,896 | 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;
} |
31,010,560 | 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;
} |
47,601,272 | 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;
} |
81,600,422 | 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;
} |
15,494,947 | ru | 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;
} |
268,385 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 166. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(166));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 166.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(166));
} |
96,188,116 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 275 is prime in JavaScript. | function isPrime() {
let n = 275;
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 275 is prime in JavaScript.
### Response:
function isPrime() {
let n = 275;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
136,984 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 5536. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5536)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 5536.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5536)); |
11,855,263 | 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,036,986 | en | C# | var_decl | beginner | How to declare a variable buffer with value 454160 in C#? | int buffer = 454160; | ### Instruction:
How to declare a variable buffer with value 454160 in C#?
### Response:
int buffer = 454160; |
2,864,921 | ru | C# | var_decl | beginner | Как объявить переменную speed со значением 892385 в C#? | int speed = 892385; | ### Instruction:
Как объявить переменную speed со значением 892385 в C#?
### Response:
int speed = 892385; |
4,103,905 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 399897 in JavaScript? | let y = 399897; | ### Instruction:
How to declare a variable y with value 399897 in JavaScript?
### Response:
let y = 399897; |
95,600,394 | 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;
} |
17,877,045 | 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] |
584,519 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 229. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(229)); | ### Instruction:
Write a function in C# that calculates the factorial of 229.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(229)); |
1,264,763 | en | Java | var_decl | beginner | How to declare a variable speed with value 518025 in Java? | int speed = 518025; | ### Instruction:
How to declare a variable speed with value 518025 in Java?
### Response:
int speed = 518025; |
23,728,483 | 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;
} |
2,491,177 | en | Unity | var_decl | beginner | How to declare a variable offset with value 232697 in Unity? | int offset = 232697; | ### Instruction:
How to declare a variable offset with value 232697 in Unity?
### Response:
int offset = 232697; |
4,123,542 | kk | Java | var_decl | beginner | Java тілінде 567883 мәнімен value айнымалысын қалай жариялауға болады? | int value = 567883; | ### Instruction:
Java тілінде 567883 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 567883; |
1,450,174 | en | C++ | var_decl | beginner | How to declare a variable size with value 308580 in C++? | int size = 308580; | ### Instruction:
How to declare a variable size with value 308580 in C++?
### Response:
int size = 308580; |
2,261,342 | en | C++ | var_decl | beginner | How to declare a variable y with value 967931 in C++? | int y = 967931; | ### Instruction:
How to declare a variable y with value 967931 in C++?
### Response:
int y = 967931; |
68,436,646 | 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;
} |
56,623,354 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1901 високосным. | public bool IsLeap() {
int y = 1901;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1901 високосным.
### Response:
public bool IsLeap() {
int y = 1901;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
272,490 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 8387. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8387));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 8387.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8387));
} |
312,165 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 433978 in JavaScript? | let y = 433978; | ### Instruction:
How to declare a variable y with value 433978 in JavaScript?
### Response:
let y = 433978; |
70,314,952 | 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);
} |
2,500,517 | kk | C++ | var_decl | beginner | C++ тілінде 273895 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 273895; | ### Instruction:
C++ тілінде 273895 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 273895; |
1,489,630 | en | Java | var_decl | beginner | How to declare a variable y with value 847557 in Java? | int y = 847557; | ### Instruction:
How to declare a variable y with value 847557 in Java?
### Response:
int y = 847557; |
1,986,036 | ru | Unity | var_decl | beginner | Как объявить переменную y со значением 185926 в Unity? | int y = 185926; | ### Instruction:
Как объявить переменную y со значением 185926 в Unity?
### Response:
int y = 185926; |
574,695 | kk | JavaScript | factorial | advanced | JavaScript тілінде 647 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(647)); | ### Instruction:
JavaScript тілінде 647 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(647)); |
339,588 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 8317. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8317) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 8317.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8317) << std::endl; |
4,864,775 | en | Unity | var_decl | beginner | How to declare a variable y with value 925038 in Unity? | int y = 925038; | ### Instruction:
How to declare a variable y with value 925038 in Unity?
### Response:
int y = 925038; |
86,393,135 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 172 простым. | public bool IsPrime() {
int n = 172;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 172 простым.
### Response:
public bool IsPrime() {
int n = 172;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
485,213 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 809380 в C++? | int amount = 809380; | ### Instruction:
Как объявить переменную amount со значением 809380 в C++?
### Response:
int amount = 809380; |
3,538,971 | kk | C++ | var_decl | beginner | C++ тілінде 738495 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 738495; | ### Instruction:
C++ тілінде 738495 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 738495; |
77,843,630 | kk | 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;
} |
14,941,269 | 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;
} |
23,944,949 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1999 високосным. | def is_leap():
year = 1999
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1999 високосным.
### Response:
def is_leap():
year = 1999
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,755,281 | kk | Unity | var_decl | beginner | Unity тілінде 28133 мәнімен result айнымалысын қалай жариялауға болады? | int result = 28133; | ### Instruction:
Unity тілінде 28133 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 28133; |
2,953,634 | kk | C# | var_decl | beginner | C# тілінде 222543 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 222543; | ### Instruction:
C# тілінде 222543 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 222543; |
49,750,922 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
241,457 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 1478. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1478)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 1478.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1478)) |
29,182,827 | en | Python | logic_ops | advanced | Write a function that determines if the number 471 is prime in Python. | def is_prime():
n = 471
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 471 is prime in Python.
### Response:
def is_prime():
n = 471
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,807,443 | kk | C++ | var_decl | beginner | C++ тілінде 544871 мәнімен size айнымалысын қалай жариялауға болады? | int size = 544871; | ### Instruction:
C++ тілінде 544871 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 544871; |
13,976,175 | 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;
} |
39,757,389 | en | C# | string_ops | intermediate | 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();
} |
31,724,585 | 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] |
97,851,043 | kk | 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;
} |
3,637,197 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 566869 в C++? | int size = 566869; | ### Instruction:
Как объявить переменную size со значением 566869 в C++?
### Response:
int size = 566869; |
72,133,213 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C++ функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
73,880,029 | 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();
} |
58,871,691 | en | Python | logic_ops | advanced | Write logic to check if the year 1905 is a leap year in Python. | def is_leap():
year = 1905
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1905 is a leap year in Python.
### Response:
def is_leap():
year = 1905
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
99,134,310 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 248 простым. | function isPrime() {
let n = 248;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 248 простым.
### Response:
function isPrime() {
let n = 248;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
41,666,878 | 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;
} |
3,937,747 | en | Unity | var_decl | beginner | How to declare a variable index with value 97437 in Unity? | int index = 97437; | ### Instruction:
How to declare a variable index with value 97437 in Unity?
### Response:
int index = 97437; |
83,261,702 | ru | Unity | logic_ops | advanced | Напишите на 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;
} |
27,768,807 | en | C# | logic_ops | intermediate | Write a function that determines if the number 270 is prime in C#. | 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:
Write a function that determines if the number 270 is prime in C#.
### 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;
} |
35,908,602 | en | C# | logic_ops | advanced | Write logic to check if the year 1973 is a leap year in C#. | public bool IsLeap() {
int y = 1973;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1973 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1973;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
43,778,693 | 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;
} |
40,157 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 4195. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4195)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 4195.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4195)) |
3,489,412 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 316790 мәнімен buffer айнымалысын қалай жариялауға болады? | let buffer = 316790; | ### Instruction:
JavaScript тілінде 316790 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
let buffer = 316790; |
3,987,579 | en | Python | var_decl | beginner | How to declare a variable timer with value 394398 in Python? | timer = 394398 | ### Instruction:
How to declare a variable timer with value 394398 in Python?
### Response:
timer = 394398 |
2,990,133 | ru | C++ | var_decl | beginner | Как объявить переменную index со значением 779578 в C++? | int index = 779578; | ### Instruction:
Как объявить переменную index со значением 779578 в C++?
### Response:
int index = 779578; |
498,535 | en | C# | var_decl | beginner | How to declare a variable x with value 915929 in C#? | int x = 915929; | ### Instruction:
How to declare a variable x with value 915929 in C#?
### Response:
int x = 915929; |
730,970 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 7384. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7384) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 7384.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7384) << std::endl; |
18,361,579 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
21,519,021 | en | C++ | logic_ops | advanced | Write logic to check if the year 1989 is a leap year in C++. | public bool IsLeap() {
int y = 1989;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1989 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1989;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
63,986,281 | en | Python | string_ops | advanced | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
4,912,213 | en | Java | var_decl | beginner | How to declare a variable index with value 756691 in Java? | int index = 756691; | ### Instruction:
How to declare a variable index with value 756691 in Java?
### Response:
int index = 756691; |
3,870,724 | ru | JavaScript | var_decl | beginner | Как объявить переменную amount со значением 341123 в JavaScript? | let amount = 341123; | ### Instruction:
Как объявить переменную amount со значением 341123 в JavaScript?
### Response:
let amount = 341123; |
39,847,121 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
998,974 | kk | Unity | var_decl | beginner | Unity тілінде 632515 мәнімен result айнымалысын қалай жариялауға болады? | int result = 632515; | ### Instruction:
Unity тілінде 632515 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 632515; |
4,912,798 | ru | Python | var_decl | beginner | Как объявить переменную timer со значением 693636 в Python? | timer = 693636 | ### Instruction:
Как объявить переменную timer со значением 693636 в Python?
### Response:
timer = 693636 |
51,902,732 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
39,610,402 | en | C# | string_ops | intermediate | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
3,780,602 | en | C# | var_decl | beginner | How to declare a variable x with value 682498 in C#? | int x = 682498; | ### Instruction:
How to declare a variable x with value 682498 in C#?
### Response:
int x = 682498; |
25,401,134 | 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;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.