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 |
|---|---|---|---|---|---|---|---|
4,056,086 | en | C++ | var_decl | beginner | How to declare a variable index with value 864882 in C++? | int index = 864882; | ### Instruction:
How to declare a variable index with value 864882 in C++?
### Response:
int index = 864882; |
99,416,330 | 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] |
512,969 | en | Python | var_decl | beginner | How to declare a variable size with value 161640 in Python? | size = 161640 | ### Instruction:
How to declare a variable size with value 161640 in Python?
### Response:
size = 161640 |
4,214,322 | en | Java | var_decl | beginner | How to declare a variable timer with value 706933 in Java? | int timer = 706933; | ### Instruction:
How to declare a variable timer with value 706933 in Java?
### Response:
int timer = 706933; |
23,169,235 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2077 високосным. | public bool IsLeap() {
int y = 2077;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2077 високосным.
### Response:
public bool IsLeap() {
int y = 2077;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
58,845,163 | 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,933,354 | kk | C++ | var_decl | beginner | C++ тілінде 697774 мәнімен count айнымалысын қалай жариялауға болады? | int count = 697774; | ### Instruction:
C++ тілінде 697774 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 697774; |
141,371 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 7143. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7143)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 7143.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7143)) |
38,712,327 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2010 is a leap year in C++. | public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2010 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
88,323,486 | 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] |
2,311,448 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 448793 в Python? | score = 448793 | ### Instruction:
Как объявить переменную score со значением 448793 в Python?
### Response:
score = 448793 |
2,379,384 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 771809 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 771809; | ### Instruction:
JavaScript тілінде 771809 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 771809; |
47,473,633 | en | Python | logic_ops | advanced | Write a function that determines if the number 465 is prime in Python. | def is_prime():
n = 465
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 465 is prime in Python.
### Response:
def is_prime():
n = 465
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
495,876 | en | Python | var_decl | beginner | How to declare a variable data with value 238237 in Python? | data = 238237 | ### Instruction:
How to declare a variable data with value 238237 in Python?
### Response:
data = 238237 |
951,095 | ru | Unity | var_decl | beginner | Как объявить переменную offset со значением 798696 в Unity? | int offset = 798696; | ### Instruction:
Как объявить переменную offset со значением 798696 в Unity?
### Response:
int offset = 798696; |
89,771,392 | kk | C++ | array_ops | advanced | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
79,308,079 | en | JavaScript | string_ops | advanced | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
3,251,456 | en | Unity | var_decl | beginner | How to declare a variable speed with value 789308 in Unity? | int speed = 789308; | ### Instruction:
How to declare a variable speed with value 789308 in Unity?
### Response:
int speed = 789308; |
98,603,785 | 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;
} |
61,654,116 | kk | 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);
} |
29,206,035 | en | Unity | string_ops | intermediate | Write a function that checks if a string is a palindrome in Unity. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Unity.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
56,170,590 | 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;
} |
297,979 | kk | Unity | var_decl | beginner | Unity тілінде 453790 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 453790; | ### Instruction:
Unity тілінде 453790 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 453790; |
47,313,070 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
57,001,662 | 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;
} |
92,992 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 8627. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8627)); | ### Instruction:
Write a function in C# that calculates the factorial of 8627.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8627)); |
55,578,692 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 190 простым. | public bool IsPrime() {
int n = 190;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 190 простым.
### Response:
public bool IsPrime() {
int n = 190;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
83,590 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 3441. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3441)); | ### Instruction:
Write a function in Java that calculates the factorial of 3441.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3441)); |
28,971,919 | 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;
} |
74,838,146 | 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() |
41,265,360 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
934,381 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 7756. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7756));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 7756.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(7756));
} |
893,152 | kk | Unity | var_decl | beginner | Unity тілінде 403218 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 403218; | ### Instruction:
Unity тілінде 403218 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 403218; |
87,956,397 | 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;
} |
2,558,762 | kk | Unity | var_decl | beginner | Unity тілінде 159893 мәнімен value айнымалысын қалай жариялауға болады? | int value = 159893; | ### Instruction:
Unity тілінде 159893 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 159893; |
717,848 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 540. | 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(540) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 540.
### 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(540) << std::endl; |
2,633,602 | en | C++ | var_decl | beginner | How to declare a variable rate with value 408676 in C++? | int rate = 408676; | ### Instruction:
How to declare a variable rate with value 408676 in C++?
### Response:
int rate = 408676; |
3,204,520 | en | Unity | var_decl | beginner | How to declare a variable data with value 371740 in Unity? | int data = 371740; | ### Instruction:
How to declare a variable data with value 371740 in Unity?
### Response:
int data = 371740; |
4,256,539 | ru | Unity | var_decl | beginner | Как объявить переменную offset со значением 815361 в Unity? | int offset = 815361; | ### Instruction:
Как объявить переменную offset со значением 815361 в Unity?
### Response:
int offset = 815361; |
3,101,172 | ru | JavaScript | var_decl | beginner | Как объявить переменную x со значением 324238 в JavaScript? | let x = 324238; | ### Instruction:
Как объявить переменную x со значением 324238 в JavaScript?
### Response:
let x = 324238; |
1,508,150 | kk | Python | var_decl | beginner | Python тілінде 39692 мәнімен amount айнымалысын қалай жариялауға болады? | amount = 39692 | ### Instruction:
Python тілінде 39692 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
amount = 39692 |
106,579 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 2684. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2684));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 2684.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2684));
} |
80,025,877 | kk | Python | logic_ops | intermediate | Python тилінде 124 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 124
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 124 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 124
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
961,011 | ru | JavaScript | var_decl | beginner | Как объявить переменную offset со значением 761005 в JavaScript? | let offset = 761005; | ### Instruction:
Как объявить переменную offset со значением 761005 в JavaScript?
### Response:
let offset = 761005; |
84,611,140 | 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,829,558 | kk | Python | var_decl | beginner | Python тілінде 178901 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 178901 | ### Instruction:
Python тілінде 178901 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 178901 |
1,246,162 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 653504 в Unity? | int score = 653504; | ### Instruction:
Как объявить переменную score со значением 653504 в Unity?
### Response:
int score = 653504; |
21,104,381 | 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;
} |
1,986,163 | en | C++ | var_decl | beginner | How to declare a variable speed with value 822024 in C++? | int speed = 822024; | ### Instruction:
How to declare a variable speed with value 822024 in C++?
### Response:
int speed = 822024; |
31,238,960 | ru | Unity | string_ops | intermediate | Напишите на 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;
} |
3,453,128 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 151535 в JavaScript? | let score = 151535; | ### Instruction:
Как объявить переменную score со значением 151535 в JavaScript?
### Response:
let score = 151535; |
59,239,989 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 2044 високосным. | function isLeap() {
let y = 2044;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2044 високосным.
### Response:
function isLeap() {
let y = 2044;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
24,404,642 | kk | C# | logic_ops | advanced | C# тилінде 2085 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2085 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
35,196,160 | en | JavaScript | array_ops | advanced | 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(); |
98,068,204 | 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); |
39,997,222 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
286,226 | kk | C# | var_decl | beginner | C# тілінде 476699 мәнімен y айнымалысын қалай жариялауға болады? | int y = 476699; | ### Instruction:
C# тілінде 476699 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 476699; |
76,195,775 | 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;
} |
73,764,901 | kk | Unity | logic_ops | advanced | Unity тилінде 474 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 474;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 474 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 474;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
10,663,207 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1940 високосным. | def is_leap():
year = 1940
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1940 високосным.
### Response:
def is_leap():
year = 1940
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
48,980,377 | 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;
} |
1,567,042 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 594905 в Java? | int score = 594905; | ### Instruction:
Как объявить переменную score со значением 594905 в Java?
### Response:
int score = 594905; |
77,308,892 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 2033 високосным. | def is_leap():
year = 2033
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2033 високосным.
### Response:
def is_leap():
year = 2033
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
32,228,225 | kk | Java | string_ops | advanced | 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;
} |
70,660,233 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
94,641,272 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2017 високосным. | public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2017 високосным.
### Response:
public bool IsLeap() {
int y = 2017;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,020,694 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 216412 мәнімен level айнымалысын қалай жариялауға болады? | let level = 216412; | ### Instruction:
JavaScript тілінде 216412 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
let level = 216412; |
17,731,360 | 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] |
13,320,099 | ru | C++ | array_ops | advanced | Напишите на C++ функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на C++ функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,887,788 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 64232 в C++? | int health = 64232; | ### Instruction:
Как объявить переменную health со значением 64232 в C++?
### Response:
int health = 64232; |
166,420 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 8615. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(8615)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 8615.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(8615)); |
4,492,791 | ru | C++ | var_decl | beginner | Как объявить переменную count со значением 40307 в C++? | int count = 40307; | ### Instruction:
Как объявить переменную count со значением 40307 в C++?
### Response:
int count = 40307; |
4,742,003 | kk | C# | var_decl | beginner | C# тілінде 459005 мәнімен size айнымалысын қалай жариялауға болады? | int size = 459005; | ### Instruction:
C# тілінде 459005 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 459005; |
20,903,441 | kk | C++ | logic_ops | intermediate | C++ тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,138,293 | en | C++ | var_decl | beginner | How to declare a variable amount with value 175659 in C++? | int amount = 175659; | ### Instruction:
How to declare a variable amount with value 175659 in C++?
### Response:
int amount = 175659; |
65,018,662 | kk | 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;
} |
28,290,738 | kk | Java | logic_ops | intermediate | Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1997;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1997;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
90,247,640 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 2093 високосным. | def is_leap():
year = 2093
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2093 високосным.
### Response:
def is_leap():
year = 2093
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
44,482,140 | 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;
} |
23,847,171 | 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;
} |
52,314,210 | 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;
} |
71,036,527 | en | C++ | array_ops | intermediate | 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;
} |
377,541 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 4974. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4974) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 4974.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4974) << std::endl; |
31,418,964 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1928 високосным. | function isLeap() {
let y = 1928;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1928 високосным.
### Response:
function isLeap() {
let y = 1928;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
47,661,138 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
20,858,671 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
85,980,585 | en | Unity | array_ops | intermediate | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
29,430,511 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 18 простым. | def is_prime():
n = 18
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 18 простым.
### Response:
def is_prime():
n = 18
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
41,315,589 | 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(); |
22,194,149 | en | C# | logic_ops | intermediate | Write logic to check if the year 1911 is a leap year in C#. | public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1911 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
25,632,955 | 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;
} |
1,891,477 | en | C# | var_decl | beginner | How to declare a variable result with value 419556 in C#? | int result = 419556; | ### Instruction:
How to declare a variable result with value 419556 in C#?
### Response:
int result = 419556; |
17,394,098 | en | C# | logic_ops | advanced | Write logic to check if the year 1946 is a leap year in C#. | public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1946 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
94,133,090 | en | JavaScript | array_ops | intermediate | 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); |
20,480,744 | en | C++ | array_ops | intermediate | 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;
} |
2,023,484 | en | Unity | var_decl | beginner | How to declare a variable speed with value 157253 in Unity? | int speed = 157253; | ### Instruction:
How to declare a variable speed with value 157253 in Unity?
### Response:
int speed = 157253; |
40,134,041 | en | Python | array_ops | intermediate | Write a function that filters only even numbers from a list in Python. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Write a function that filters only even numbers from a list in Python.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
62,523,164 | 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);
} |
61,053,507 | en | JavaScript | array_ops | advanced | 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(); |
50,654,142 | kk | C# | string_ops | advanced | C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.