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 |
|---|---|---|---|---|---|---|---|
70,121,360 | en | Python | logic_ops | intermediate | Write logic to check if the year 2021 is a leap year in Python. | def is_leap():
year = 2021
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2021 is a leap year in Python.
### Response:
def is_leap():
year = 2021
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
38,448,859 | 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;
} |
26,062,012 | en | Unity | string_ops | advanced | 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;
} |
89,325,151 | 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;
} |
2,198,798 | en | C# | var_decl | beginner | How to declare a variable total with value 936218 in C#? | int total = 936218; | ### Instruction:
How to declare a variable total with value 936218 in C#?
### Response:
int total = 936218; |
754,858 | kk | Java | var_decl | beginner | Java тілінде 995801 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 995801; | ### Instruction:
Java тілінде 995801 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 995801; |
29,507,504 | 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;
} |
50,252,328 | en | JavaScript | string_ops | advanced | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
98,657,833 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 1974 високосным. | function isLeap() {
let y = 1974;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1974 високосным.
### Response:
function isLeap() {
let y = 1974;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
897,383 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 268034 в Unity? | int index = 268034; | ### Instruction:
Как объявить переменную index со значением 268034 в Unity?
### Response:
int index = 268034; |
88,199,171 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
4,075,104 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 144668 в C#? | int rate = 144668; | ### Instruction:
Как объявить переменную rate со значением 144668 в C#?
### Response:
int rate = 144668; |
63,441,788 | en | C# | string_ops | intermediate | Write a function that checks if a string is a palindrome in C#. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C#.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
1,281,312 | en | JavaScript | var_decl | beginner | How to declare a variable speed with value 421224 in JavaScript? | let speed = 421224; | ### Instruction:
How to declare a variable speed with value 421224 in JavaScript?
### Response:
let speed = 421224; |
54,934,145 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2097 is a leap year in C++. | public bool IsLeap() {
int y = 2097;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2097 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2097;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
91,485,350 | kk | Unity | string_ops | advanced | 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;
} |
74,080,140 | 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();
} |
979,312 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 3913. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(3913)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 3913.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(3913)); |
2,405 | en | Python | func_def | intermediate | Write a function validate in Python that takes timer and doubles it. | def validate(timer):
return timer * 2 | ### Instruction:
Write a function validate in Python that takes timer and doubles it.
### Response:
def validate(timer):
return timer * 2 |
91,961,269 | en | Python | logic_ops | intermediate | Write a function that determines if the number 299 is prime in Python. | def is_prime():
n = 299
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 299 is prime in Python.
### Response:
def is_prime():
n = 299
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
85,347,245 | kk | Python | array_ops | advanced | 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] |
191,237 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 6063. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6063) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 6063.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(6063) << std::endl; |
98,891,264 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 21 is prime in Unity. | public bool IsPrime() {
int n = 21;
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 21 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 21;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,662,971 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 14792 в C++? | int size = 14792; | ### Instruction:
Как объявить переменную size со значением 14792 в C++?
### Response:
int size = 14792; |
4,856,895 | en | JavaScript | var_decl | beginner | How to declare a variable value with value 521357 in JavaScript? | let value = 521357; | ### Instruction:
How to declare a variable value with value 521357 in JavaScript?
### Response:
let value = 521357; |
15,864,651 | 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); |
3,890,888 | kk | Unity | var_decl | beginner | Unity тілінде 791561 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 791561; | ### Instruction:
Unity тілінде 791561 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 791561; |
42,562,844 | 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;
} |
77,239,527 | kk | Unity | string_ops | advanced | 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;
} |
1,394 | en | Unity | func_def | intermediate | Write a function apply in Unity that takes total and doubles it. | int apply(int total) {
return total * 2;
} | ### Instruction:
Write a function apply in Unity that takes total and doubles it.
### Response:
int apply(int total) {
return total * 2;
} |
3,358,620 | en | C++ | var_decl | beginner | How to declare a variable index with value 404246 in C++? | int index = 404246; | ### Instruction:
How to declare a variable index with value 404246 in C++?
### Response:
int index = 404246; |
4,743,327 | ru | Unity | var_decl | beginner | Как объявить переменную size со значением 434451 в Unity? | int size = 434451; | ### Instruction:
Как объявить переменную size со значением 434451 в Unity?
### Response:
int size = 434451; |
3,177,378 | en | C# | var_decl | beginner | How to declare a variable size with value 579745 in C#? | int size = 579745; | ### Instruction:
How to declare a variable size with value 579745 in C#?
### Response:
int size = 579745; |
41,754,279 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 325 простым. | public bool IsPrime() {
int n = 325;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 325 простым.
### Response:
public bool IsPrime() {
int n = 325;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,764,234 | en | Unity | var_decl | beginner | How to declare a variable weight with value 52382 in Unity? | int weight = 52382; | ### Instruction:
How to declare a variable weight with value 52382 in Unity?
### Response:
int weight = 52382; |
79,552,108 | 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;
} |
35,971,900 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2091 високосным. | public bool IsLeap() {
int y = 2091;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2091 високосным.
### Response:
public bool IsLeap() {
int y = 2091;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
87,827,442 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 183 простым. | def is_prime():
n = 183
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 183 простым.
### Response:
def is_prime():
n = 183
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
93,092,121 | kk | 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;
} |
76,486,832 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
2,405,556 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 199979 в Unity? | int index = 199979; | ### Instruction:
Как объявить переменную index со значением 199979 в Unity?
### Response:
int index = 199979; |
31,208,924 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
2,485,490 | kk | Java | var_decl | beginner | Java тілінде 973723 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 973723; | ### Instruction:
Java тілінде 973723 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 973723; |
52,597,553 | 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();
} |
93,970,174 | kk | C++ | logic_ops | advanced | C++ тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 14 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 14;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,529,312 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1948 високосным. | public bool IsLeap() {
int y = 1948;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1948 високосным.
### Response:
public bool IsLeap() {
int y = 1948;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
614,165 | ru | C++ | var_decl | beginner | Как объявить переменную count со значением 521997 в C++? | int count = 521997; | ### Instruction:
Как объявить переменную count со значением 521997 в C++?
### Response:
int count = 521997; |
51,786,303 | 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();
} |
1,176,245 | ru | Unity | var_decl | beginner | Как объявить переменную size со значением 800960 в Unity? | int size = 800960; | ### Instruction:
Как объявить переменную size со значением 800960 в Unity?
### Response:
int size = 800960; |
61,758,783 | kk | C# | string_ops | intermediate | 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;
} |
202,298 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 8147. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8147)); | ### Instruction:
Write a function in Java that calculates the factorial of 8147.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(8147)); |
14,519,696 | ru | Unity | string_ops | advanced | Напишите на 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;
} |
62,871,297 | 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;
} |
36,835,859 | kk | Java | logic_ops | advanced | Java тилінде 138 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 138;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 138 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 138;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
40,831,550 | 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;
} |
45,406,575 | 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;
} |
21,819,257 | en | C# | logic_ops | advanced | Write logic to check if the year 2008 is a leap year in C#. | public bool IsLeap() {
int y = 2008;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2008 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2008;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
80,413,774 | kk | C# | string_ops | intermediate | C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
27,424,342 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | 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 Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
44,407,006 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
595,814 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 9461. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9461)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 9461.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9461)) |
89,602,825 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 128 простым. | def is_prime():
n = 128
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 128 простым.
### Response:
def is_prime():
n = 128
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
71,409,728 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2070 високосным. | public bool IsLeap() {
int y = 2070;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2070 високосным.
### Response:
public bool IsLeap() {
int y = 2070;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,917,659 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
94,898,315 | en | C++ | string_ops | advanced | Write a function that checks if a string is a palindrome in C++. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C++.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,850,069 | ru | C++ | var_decl | beginner | Как объявить переменную data со значением 280931 в C++? | int data = 280931; | ### Instruction:
Как объявить переменную data со значением 280931 в C++?
### Response:
int data = 280931; |
194,772 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 6943. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6943)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 6943.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6943)); |
213,811 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 9538. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9538)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 9538.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9538)); |
89,946,736 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 313 простым. | def is_prime():
n = 313
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 313 простым.
### Response:
def is_prime():
n = 313
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
70,088 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 9144. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9144)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 9144.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9144)) |
27,505,923 | 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;
} |
85,883,965 | kk | Java | logic_ops | advanced | Java тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1955;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1955 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1955;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,579,359 | kk | Java | var_decl | beginner | Java тілінде 423218 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 423218; | ### Instruction:
Java тілінде 423218 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 423218; |
91,989,157 | 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();
} |
46,901,934 | 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;
} |
58,597,603 | 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;
} |
18,899,422 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2050 високосным. | function isLeap() {
let y = 2050;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2050 високосным.
### Response:
function isLeap() {
let y = 2050;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
74,274,680 | en | Python | string_ops | intermediate | 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() |
37,124,508 | 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,945,224 | en | C# | var_decl | beginner | How to declare a variable timer with value 68371 in C#? | int timer = 68371; | ### Instruction:
How to declare a variable timer with value 68371 in C#?
### Response:
int timer = 68371; |
86,702,828 | 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();
} |
58,676,812 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 1921 високосным. | public bool IsLeap() {
int y = 1921;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1921 високосным.
### Response:
public bool IsLeap() {
int y = 1921;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
16,200,091 | en | Unity | string_ops | advanced | 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();
} |
1,664,454 | kk | Java | var_decl | beginner | Java тілінде 190845 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 190845; | ### Instruction:
Java тілінде 190845 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 190845; |
1,100,110 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 297806 в Unity? | int amount = 297806; | ### Instruction:
Как объявить переменную amount со значением 297806 в Unity?
### Response:
int amount = 297806; |
79,793,173 | kk | Java | array_ops | advanced | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
4,327,937 | kk | C++ | var_decl | beginner | C++ тілінде 329691 мәнімен y айнымалысын қалай жариялауға болады? | int y = 329691; | ### Instruction:
C++ тілінде 329691 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 329691; |
4,158,767 | ru | JavaScript | var_decl | beginner | Как объявить переменную offset со значением 431571 в JavaScript? | let offset = 431571; | ### Instruction:
Как объявить переменную offset со значением 431571 в JavaScript?
### Response:
let offset = 431571; |
681,450 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 2174. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2174));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 2174.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2174));
} |
793,110 | en | JavaScript | var_decl | beginner | How to declare a variable buffer with value 916138 in JavaScript? | let buffer = 916138; | ### Instruction:
How to declare a variable buffer with value 916138 in JavaScript?
### Response:
let buffer = 916138; |
4,321,399 | en | C# | var_decl | beginner | How to declare a variable count with value 114151 in C#? | int count = 114151; | ### Instruction:
How to declare a variable count with value 114151 in C#?
### Response:
int count = 114151; |
18,547,800 | 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();
} |
65,611,176 | 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;
} |
1,466,866 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 8007. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8007)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 8007.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8007)); |
4,476,040 | en | JavaScript | var_decl | beginner | How to declare a variable index with value 47106 in JavaScript? | let index = 47106; | ### Instruction:
How to declare a variable index with value 47106 in JavaScript?
### Response:
let index = 47106; |
42,481,293 | 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аеёиоуыэюя') |
60,919,403 | ru | Unity | array_ops | intermediate | Напишите на 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;
} |
222,944 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 3885-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3885)); | ### Instruction:
C# тілінде 1-ден 3885-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3885)); |
93,705,519 | kk | Java | string_ops | intermediate | Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,144,229 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 829942 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 829942; | ### Instruction:
JavaScript тілінде 829942 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 829942; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.