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 |
|---|---|---|---|---|---|---|---|
2,981,990 | en | Python | var_decl | beginner | How to declare a variable offset with value 537675 in Python? | offset = 537675 | ### Instruction:
How to declare a variable offset with value 537675 in Python?
### Response:
offset = 537675 |
46,335,267 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
53,705,371 | 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] |
78,117,118 | ru | 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] |
91,135 | kk | Python | var_decl | beginner | Python тілінде 18662 мәнімен data айнымалысын қалай жариялауға болады? | data = 18662 | ### Instruction:
Python тілінде 18662 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
data = 18662 |
3,014,529 | kk | Unity | var_decl | beginner | Unity тілінде 881773 мәнімен score айнымалысын қалай жариялауға болады? | int score = 881773; | ### Instruction:
Unity тілінде 881773 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 881773; |
80,557,290 | en | C# | logic_ops | advanced | Write logic to check if the year 2089 is a leap year in C#. | public bool IsLeap() {
int y = 2089;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2089 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2089;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
93,802,995 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C++ функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
84,553 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 9791. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9791)); | ### Instruction:
Write a function in C# that calculates the factorial of 9791.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(9791)); |
2,738,325 | ru | JavaScript | var_decl | beginner | Как объявить переменную buffer со значением 161909 в JavaScript? | let buffer = 161909; | ### Instruction:
Как объявить переменную buffer со значением 161909 в JavaScript?
### Response:
let buffer = 161909; |
90,705,766 | 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); |
56,260,455 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
66,609,461 | en | Java | logic_ops | intermediate | Write a function that determines if the number 449 is prime in Java. | public bool IsPrime() {
int n = 449;
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 449 is prime in Java.
### Response:
public bool IsPrime() {
int n = 449;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,756,579 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 27407 в Java? | int size = 27407; | ### Instruction:
Как объявить переменную size со значением 27407 в Java?
### Response:
int size = 27407; |
108,865 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 8667-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8667));
} | ### Instruction:
Unity тілінде 1-ден 8667-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8667));
} |
772,978 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 7420. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7420)); | ### Instruction:
Write a function in C# that calculates the factorial of 7420.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7420)); |
4,791,064 | ru | JavaScript | var_decl | beginner | Как объявить переменную x со значением 352515 в JavaScript? | let x = 352515; | ### Instruction:
Как объявить переменную x со значением 352515 в JavaScript?
### Response:
let x = 352515; |
38,120,115 | kk | Java | logic_ops | advanced | Java тилінде 19 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 19;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 19 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 19;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
85,866,917 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2062 високосным. | function isLeap() {
let y = 2062;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2062 високосным.
### Response:
function isLeap() {
let y = 2062;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
82,048,910 | 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;
} |
87,809,641 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 295 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 295;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 295 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 295;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
2,188,786 | en | C# | var_decl | beginner | How to declare a variable health with value 916754 in C#? | int health = 916754; | ### Instruction:
How to declare a variable health with value 916754 in C#?
### Response:
int health = 916754; |
38,210,631 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2033 високосным. | public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2033 високосным.
### Response:
public bool IsLeap() {
int y = 2033;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
398,277 | kk | Python | factorial | advanced | Python тілінде 7776 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7776)) | ### Instruction:
Python тілінде 7776 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7776)) |
4,619,023 | kk | C++ | var_decl | beginner | C++ тілінде 733247 мәнімен level айнымалысын қалай жариялауға болады? | int level = 733247; | ### Instruction:
C++ тілінде 733247 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 733247; |
79,475,880 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
79,744,260 | 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,694,102 | kk | Python | var_decl | beginner | Python тілінде 20502 мәнімен x айнымалысын қалай жариялауға болады? | x = 20502 | ### Instruction:
Python тілінде 20502 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
x = 20502 |
73,567,252 | 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;
} |
2,481,633 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 408234 мәнімен score айнымалысын қалай жариялауға болады? | let score = 408234; | ### Instruction:
JavaScript тілінде 408234 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
let score = 408234; |
93,980,429 | 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;
} |
736,901 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 444355 в C#? | int rate = 444355; | ### Instruction:
Как объявить переменную rate со значением 444355 в C#?
### Response:
int rate = 444355; |
44,934,265 | 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;
} |
3,277,419 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 330029 в C++? | int result = 330029; | ### Instruction:
Как объявить переменную result со значением 330029 в C++?
### Response:
int result = 330029; |
97,496,838 | kk | C++ | array_ops | intermediate | C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
71,692,107 | kk | C# | logic_ops | advanced | C# тилінде 2069 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2069 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2069;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
94,465,782 | 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;
} |
66,305,150 | en | Python | logic_ops | intermediate | Write logic to check if the year 2098 is a leap year in Python. | def is_leap():
year = 2098
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2098 is a leap year in Python.
### Response:
def is_leap():
year = 2098
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
77,382,159 | kk | Python | string_ops | advanced | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
97,108,091 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Java функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
16,020,654 | en | Python | logic_ops | intermediate | Write logic to check if the year 2064 is a leap year in Python. | def is_leap():
year = 2064
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2064 is a leap year in Python.
### Response:
def is_leap():
year = 2064
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,887,197 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 866086 мәнімен total айнымалысын қалай жариялауға болады? | let total = 866086; | ### Instruction:
JavaScript тілінде 866086 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
let total = 866086; |
26,096,079 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1954;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1954 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1954;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
82,104,103 | 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;
} |
15,882,068 | 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] |
85,548,831 | kk | Unity | logic_ops | intermediate | Unity тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 204 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 204;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,924,263 | en | Unity | var_decl | beginner | How to declare a variable data with value 257030 in Unity? | int data = 257030; | ### Instruction:
How to declare a variable data with value 257030 in Unity?
### Response:
int data = 257030; |
16,971,432 | 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);
} |
2,043,617 | ru | C# | var_decl | beginner | Как объявить переменную x со значением 421684 в C#? | int x = 421684; | ### Instruction:
Как объявить переменную x со значением 421684 в C#?
### Response:
int x = 421684; |
4,860,262 | ru | Java | var_decl | beginner | Как объявить переменную count со значением 917657 в Java? | int count = 917657; | ### Instruction:
Как объявить переменную count со значением 917657 в Java?
### Response:
int count = 917657; |
694,228 | ru | C++ | var_decl | beginner | Как объявить переменную score со значением 937523 в C++? | int score = 937523; | ### Instruction:
Как объявить переменную score со значением 937523 в C++?
### Response:
int score = 937523; |
48,604,077 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
47,415,418 | 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;
} |
39,431,302 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
86,382,265 | 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;
} |
97,332,583 | 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;
} |
80,402,818 | kk | C# | logic_ops | advanced | C# тилінде 218 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 218;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 218 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 218;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
18,005,312 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 96 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 96;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 96 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 96;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
24,074,098 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 173 простым. | public bool IsPrime() {
int n = 173;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 173 простым.
### Response:
public bool IsPrime() {
int n = 173;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
67,521,304 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
4,339,693 | ru | C++ | var_decl | beginner | Как объявить переменную health со значением 929910 в C++? | int health = 929910; | ### Instruction:
Как объявить переменную health со значением 929910 в C++?
### Response:
int health = 929910; |
477,439 | kk | C# | factorial | advanced | C# тілінде 2173 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2173)); | ### Instruction:
C# тілінде 2173 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2173)); |
33,405,774 | 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;
} |
77,359,135 | 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();
} |
82,499,354 | 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(); |
15,762,725 | kk | C# | array_ops | advanced | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
99,429,951 | 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); |
65,079,406 | ru | 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;
} |
1,689,320 | en | C++ | var_decl | beginner | How to declare a variable timer with value 103506 in C++? | int timer = 103506; | ### Instruction:
How to declare a variable timer with value 103506 in C++?
### Response:
int timer = 103506; |
94,544,473 | 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;
} |
1,221,381 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 1907. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1907));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 1907.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1907));
} |
33,269,392 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
67,447,061 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2017;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2017;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
82,552,486 | en | C++ | logic_ops | advanced | Write logic to check if the year 2002 is a leap year in C++. | public bool IsLeap() {
int y = 2002;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2002 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2002;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,990,055 | 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;
} |
432,336 | en | Java | var_decl | beginner | How to declare a variable limit with value 934969 in Java? | int limit = 934969; | ### Instruction:
How to declare a variable limit with value 934969 in Java?
### Response:
int limit = 934969; |
2,431,606 | kk | C# | var_decl | beginner | C# тілінде 587479 мәнімен health айнымалысын қалай жариялауға болады? | int health = 587479; | ### Instruction:
C# тілінде 587479 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 587479; |
61,423,006 | en | Unity | array_ops | advanced | Write a function that reverses a list in Unity. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Unity.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,717,101 | en | JavaScript | var_decl | beginner | How to declare a variable data with value 350555 in JavaScript? | let data = 350555; | ### Instruction:
How to declare a variable data with value 350555 in JavaScript?
### Response:
let data = 350555; |
3,260,751 | ru | Python | var_decl | beginner | Как объявить переменную result со значением 393470 в Python? | result = 393470 | ### Instruction:
Как объявить переменную result со значением 393470 в Python?
### Response:
result = 393470 |
1,923,314 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 319658 в Java? | int health = 319658; | ### Instruction:
Как объявить переменную health со значением 319658 в Java?
### Response:
int health = 319658; |
4,630,985 | kk | Unity | var_decl | beginner | Unity тілінде 272751 мәнімен index айнымалысын қалай жариялауға болады? | int index = 272751; | ### Instruction:
Unity тілінде 272751 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 272751; |
41,064,654 | ru | 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;
} |
63,028,009 | en | Python | logic_ops | intermediate | Write logic to check if the year 2051 is a leap year in Python. | def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2051 is a leap year in Python.
### Response:
def is_leap():
year = 2051
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
4,461,759 | kk | Python | var_decl | beginner | Python тілінде 513755 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 513755 | ### Instruction:
Python тілінде 513755 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 513755 |
4,266,837 | kk | C++ | var_decl | beginner | C++ тілінде 668794 мәнімен level айнымалысын қалай жариялауға болады? | int level = 668794; | ### Instruction:
C++ тілінде 668794 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 668794; |
1,355,923 | kk | Java | factorial | advanced | Java тілінде 3090 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3090)); | ### Instruction:
Java тілінде 3090 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3090)); |
55,122,193 | kk | Unity | array_ops | advanced | Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
677,590 | ru | C# | var_decl | beginner | Как объявить переменную weight со значением 526323 в C#? | int weight = 526323; | ### Instruction:
Как объявить переменную weight со значением 526323 в C#?
### Response:
int weight = 526323; |
35,117,879 | 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;
} |
3,262,975 | kk | C# | var_decl | beginner | C# тілінде 526708 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 526708; | ### Instruction:
C# тілінде 526708 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 526708; |
70,077,559 | 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();
} |
32,108,997 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2096 високосным. | public bool IsLeap() {
int y = 2096;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2096 високосным.
### Response:
public bool IsLeap() {
int y = 2096;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
99,299,412 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2010 високосным. | public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2010 високосным.
### Response:
public bool IsLeap() {
int y = 2010;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
99,587,003 | 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] |
34,678,150 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
22,039,089 | en | C++ | array_ops | intermediate | Write a function that finds the maximum number in an array in C++. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C++.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
98,119,234 | ru | C# | array_ops | intermediate | Напишите на C# функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на C# функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,241,456 | en | Unity | var_decl | beginner | How to declare a variable level with value 840626 in Unity? | int level = 840626; | ### Instruction:
How to declare a variable level with value 840626 in Unity?
### Response:
int level = 840626; |
98,103,436 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1944;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1944;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.