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 |
|---|---|---|---|---|---|---|---|
3,561,424 | en | Unity | var_decl | beginner | How to declare a variable count with value 734083 in Unity? | int count = 734083; | ### Instruction:
How to declare a variable count with value 734083 in Unity?
### Response:
int count = 734083; |
54,399,322 | en | C# | logic_ops | advanced | Write a function that determines if the number 124 is prime in C#. | public bool IsPrime() {
int n = 124;
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 124 is prime in C#.
### Response:
public bool IsPrime() {
int n = 124;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
56,710,893 | 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();
} |
2,018,535 | ru | JavaScript | var_decl | beginner | Как объявить переменную x со значением 457848 в JavaScript? | let x = 457848; | ### Instruction:
Как объявить переменную x со значением 457848 в JavaScript?
### Response:
let x = 457848; |
62,718,959 | en | Unity | logic_ops | advanced | Write logic to check if the year 1960 is a leap year in Unity. | public bool IsLeap() {
int y = 1960;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1960 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1960;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
89,878,640 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 275 простым. | public bool IsPrime() {
int n = 275;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 275 простым.
### Response:
public bool IsPrime() {
int n = 275;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
45,443,735 | 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);
} |
1,097,784 | kk | C++ | var_decl | beginner | C++ тілінде 461036 мәнімен value айнымалысын қалай жариялауға болады? | int value = 461036; | ### Instruction:
C++ тілінде 461036 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 461036; |
2,967,760 | ru | JavaScript | var_decl | beginner | Как объявить переменную rate со значением 291607 в JavaScript? | let rate = 291607; | ### Instruction:
Как объявить переменную rate со значением 291607 в JavaScript?
### Response:
let rate = 291607; |
25,228,230 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 192 простым. | public bool IsPrime() {
int n = 192;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 192 простым.
### Response:
public bool IsPrime() {
int n = 192;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
61,643,773 | 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;
} |
72,967,139 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
1,411,426 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 770525 в Python? | amount = 770525 | ### Instruction:
Как объявить переменную amount со значением 770525 в Python?
### Response:
amount = 770525 |
88,906 | en | Unity | var_decl | beginner | How to declare a variable amount with value 633804 in Unity? | int amount = 633804; | ### Instruction:
How to declare a variable amount with value 633804 in Unity?
### Response:
int amount = 633804; |
66,930,445 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
3,343,477 | kk | C++ | var_decl | beginner | C++ тілінде 516360 мәнімен value айнымалысын қалай жариялауға болады? | int value = 516360; | ### Instruction:
C++ тілінде 516360 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 516360; |
55,277,716 | kk | Java | logic_ops | advanced | Java тилінде 2067 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2067 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
29,501,996 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 70 простым. | def is_prime():
n = 70
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 70 простым.
### Response:
def is_prime():
n = 70
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
84,506,317 | en | C# | logic_ops | intermediate | Write logic to check if the year 1942 is a leap year in C#. | public bool IsLeap() {
int y = 1942;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1942 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1942;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,370,216 | en | Python | var_decl | beginner | How to declare a variable size with value 791253 in Python? | size = 791253 | ### Instruction:
How to declare a variable size with value 791253 in Python?
### Response:
size = 791253 |
3,659,793 | kk | C++ | var_decl | beginner | C++ тілінде 417098 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 417098; | ### Instruction:
C++ тілінде 417098 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 417098; |
79,651,310 | 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] |
26,605,312 | kk | Java | array_ops | advanced | Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
65,265,563 | en | Unity | logic_ops | advanced | Write a function that determines if the number 378 is prime in Unity. | public bool IsPrime() {
int n = 378;
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 378 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 378;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
121,757 | en | C# | var_decl | beginner | How to declare a variable amount with value 172958 in C#? | int amount = 172958; | ### Instruction:
How to declare a variable amount with value 172958 in C#?
### Response:
int amount = 172958; |
96,044,945 | 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);
} |
19,814,696 | 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();
} |
26,541,804 | 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;
} |
92,809,729 | 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();
} |
3,987,557 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 752891 в Python? | amount = 752891 | ### Instruction:
Как объявить переменную amount со значением 752891 в Python?
### Response:
amount = 752891 |
4,134,143 | kk | Unity | var_decl | beginner | Unity тілінде 514737 мәнімен health айнымалысын қалай жариялауға болады? | int health = 514737; | ### Instruction:
Unity тілінде 514737 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 514737; |
83,906,306 | en | C++ | array_ops | intermediate | Write a function that reverses a list in C++. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C++.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
73,364,206 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 343 is prime in Unity. | public bool IsPrime() {
int n = 343;
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 343 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 343;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
29,134,559 | 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,322,831 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
35,934,858 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 2047 високосным. | public bool IsLeap() {
int y = 2047;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2047 високосным.
### Response:
public bool IsLeap() {
int y = 2047;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
28,668,664 | 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();
} |
19,783,373 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1914 високосным. | def is_leap():
year = 1914
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1914 високосным.
### Response:
def is_leap():
year = 1914
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
14,225,333 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
590,429 | kk | C++ | factorial | advanced | C++ тілінде 5305 санының факториалын есептейтін функция жаз. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5305) << std::endl; | ### Instruction:
C++ тілінде 5305 санының факториалын есептейтін функция жаз.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(5305) << std::endl; |
3,853,141 | ru | C++ | var_decl | beginner | Как объявить переменную score со значением 723460 в C++? | int score = 723460; | ### Instruction:
Как объявить переменную score со значением 723460 в C++?
### Response:
int score = 723460; |
385,450 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 960-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(960)); | ### Instruction:
C# тілінде 1-ден 960-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(960)); |
2,927,993 | kk | Unity | var_decl | beginner | Unity тілінде 56308 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 56308; | ### Instruction:
Unity тілінде 56308 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 56308; |
20,098,576 | en | Java | string_ops | intermediate | 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;
} |
43,006,418 | en | JavaScript | string_ops | advanced | 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; |
21,643,258 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
46,604,763 | en | Unity | array_ops | intermediate | 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;
} |
97,409,400 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
24,208,520 | 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();
} |
1,839,639 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 892254 in JavaScript? | let speed = 892254; | ### Instruction:
How to declare a variable speed with value 892254 in JavaScript?
### Response:
let speed = 892254; |
2,174,818 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 915827 in JavaScript? | let x = 915827; | ### Instruction:
How to declare a variable x with value 915827 in JavaScript?
### Response:
let x = 915827; |
69,900,220 | 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;
} |
104,095 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 393. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(393) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 393.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(393) << std::endl; |
786,902 | ru | Java | var_decl | beginner | Как объявить переменную rate со значением 635260 в Java? | int rate = 635260; | ### Instruction:
Как объявить переменную rate со значением 635260 в Java?
### Response:
int rate = 635260; |
12,198,753 | 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;
} |
34,990,015 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
3,658,127 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 783576 в Unity? | int index = 783576; | ### Instruction:
Как объявить переменную index со значением 783576 в Unity?
### Response:
int index = 783576; |
3,407,758 | kk | C# | var_decl | beginner | C# тілінде 884547 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 884547; | ### Instruction:
C# тілінде 884547 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 884547; |
62,092,884 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 482 is prime in JavaScript. | function isPrime() {
let n = 482;
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 482 is prime in JavaScript.
### Response:
function isPrime() {
let n = 482;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
94,202,876 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
13,875,122 | 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,555,279 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 893251 in JavaScript? | let level = 893251; | ### Instruction:
How to declare a variable level with value 893251 in JavaScript?
### Response:
let level = 893251; |
97,060,951 | kk | Java | logic_ops | advanced | Java тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1980;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1980 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1980;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
77,601,154 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1988;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1988;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
95,913,129 | en | Unity | logic_ops | advanced | Write a function that determines if the number 406 is prime in Unity. | public bool IsPrime() {
int n = 406;
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 406 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 406;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
23,377,101 | 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;
} |
206,540 | en | C++ | factorial | advanced | Write a function in C++ that calculates the factorial of 2733. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2733) << std::endl; | ### Instruction:
Write a function in C++ that calculates the factorial of 2733.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(2733) << std::endl; |
74,257,531 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
612,614 | kk | Python | var_decl | beginner | Python тілінде 2814 мәнімен buffer айнымалысын қалай жариялауға болады? | buffer = 2814 | ### Instruction:
Python тілінде 2814 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
buffer = 2814 |
22,790,351 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 444;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 444 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 444;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
450,255 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 2375. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2375)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 2375.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2375)); |
77,527,517 | en | JavaScript | string_ops | advanced | 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; |
80,164,839 | 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();
} |
39,359,808 | 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();
} |
13,357,696 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1921 високосным. | public bool IsLeap() {
int y = 1921;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1921 високосным.
### Response:
public bool IsLeap() {
int y = 1921;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
91,258,175 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1990 високосным. | public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1990 високосным.
### Response:
public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,799,379 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 107 простым. | public bool IsPrime() {
int n = 107;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 107 простым.
### Response:
public bool IsPrime() {
int n = 107;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
73,664,252 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1916;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1916;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
48,503,700 | kk | Unity | logic_ops | intermediate | Unity тилінде 104 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 104;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 104 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 104;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,051,688 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 512745 в JavaScript? | let total = 512745; | ### Instruction:
Как объявить переменную total со значением 512745 в JavaScript?
### Response:
let total = 512745; |
58,341,257 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
83,873,309 | ru | 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;
} |
33,966,945 | 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;
} |
36,016,956 | 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;
} |
4,624,779 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 700783 в Java? | int x = 700783; | ### Instruction:
Как объявить переменную x со значением 700783 в Java?
### Response:
int x = 700783; |
56,194,409 | 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();
} |
72,924,759 | 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(); |
578,703 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 410865 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 410865; | ### Instruction:
JavaScript тілінде 410865 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 410865; |
1,235,129 | en | Python | var_decl | beginner | How to declare a variable health with value 207551 in Python? | health = 207551 | ### Instruction:
How to declare a variable health with value 207551 in Python?
### Response:
health = 207551 |
50,958,216 | en | Java | array_ops | intermediate | 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;
} |
753,460 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 2917. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2917)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 2917.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(2917)) |
48,817,616 | en | JavaScript | array_ops | intermediate | 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); |
29,737,418 | en | Python | string_ops | intermediate | 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] |
51,161,866 | 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,507,261 | en | Java | var_decl | beginner | How to declare a variable buffer with value 446754 in Java? | int buffer = 446754; | ### Instruction:
How to declare a variable buffer with value 446754 in Java?
### Response:
int buffer = 446754; |
40,093,318 | 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);
} |
68,269,531 | 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;
} |
1,228,082 | kk | Python | var_decl | beginner | Python тілінде 928869 мәнімен count айнымалысын қалай жариялауға болады? | count = 928869 | ### Instruction:
Python тілінде 928869 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 928869 |
235,362 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 915525 в C++? | int rate = 915525; | ### Instruction:
Как объявить переменную rate со значением 915525 в C++?
### Response:
int rate = 915525; |
2,715,345 | en | Unity | var_decl | beginner | How to declare a variable offset with value 187850 in Unity? | int offset = 187850; | ### Instruction:
How to declare a variable offset with value 187850 in Unity?
### Response:
int offset = 187850; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.