id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
559,537 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 9639-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9639)); | ### Instruction:
C# тілінде 1-ден 9639-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9639)); |
71,966,007 | en | C++ | string_ops | intermediate | Write a function that counts vowels in a text in C++. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C++.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,705,906 | ru | JavaScript | var_decl | beginner | Как объявить переменную count со значением 303450 в JavaScript? | let count = 303450; | ### Instruction:
Как объявить переменную count со значением 303450 в JavaScript?
### Response:
let count = 303450; |
79,213,661 | kk | C++ | array_ops | intermediate | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
63,309,313 | 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;
} |
93,354,335 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
43,664,268 | 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;
} |
4,506,400 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 76932 в C++? | int size = 76932; | ### Instruction:
Как объявить переменную size со значением 76932 в C++?
### Response:
int size = 76932; |
3,258,514 | kk | C++ | var_decl | beginner | C++ тілінде 163782 мәнімен total айнымалысын қалай жариялауға болады? | int total = 163782; | ### Instruction:
C++ тілінде 163782 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 163782; |
1,911,962 | kk | C# | var_decl | beginner | C# тілінде 460852 мәнімен x айнымалысын қалай жариялауға болады? | int x = 460852; | ### Instruction:
C# тілінде 460852 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 460852; |
1,587,404 | en | Unity | var_decl | beginner | How to declare a variable data with value 600383 in Unity? | int data = 600383; | ### Instruction:
How to declare a variable data with value 600383 in Unity?
### Response:
int data = 600383; |
18,626,100 | 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(''); |
71,453,928 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 274 простым. | public bool IsPrime() {
int n = 274;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 274 простым.
### Response:
public bool IsPrime() {
int n = 274;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
24,787,126 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C# функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
70,785,667 | en | C++ | logic_ops | advanced | Write a function that determines if the number 108 is prime in C++. | public bool IsPrime() {
int n = 108;
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 108 is prime in C++.
### Response:
public bool IsPrime() {
int n = 108;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,069,082 | en | C++ | var_decl | beginner | How to declare a variable result with value 938069 in C++? | int result = 938069; | ### Instruction:
How to declare a variable result with value 938069 in C++?
### Response:
int result = 938069; |
925,918 | en | Java | var_decl | beginner | How to declare a variable level with value 112026 in Java? | int level = 112026; | ### Instruction:
How to declare a variable level with value 112026 in Java?
### Response:
int level = 112026; |
2,844,049 | ru | C++ | var_decl | beginner | Как объявить переменную offset со значением 5046 в C++? | int offset = 5046; | ### Instruction:
Как объявить переменную offset со значением 5046 в C++?
### Response:
int offset = 5046; |
28,036,352 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1931 is a leap year in JavaScript. | function isLeap() {
let y = 1931;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1931 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1931;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
2,349,586 | en | Python | var_decl | beginner | How to declare a variable speed with value 573752 in Python? | speed = 573752 | ### Instruction:
How to declare a variable speed with value 573752 in Python?
### Response:
speed = 573752 |
30,658,236 | kk | C++ | array_ops | intermediate | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
92,602,116 | 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;
} |
94,421,060 | kk | C# | logic_ops | advanced | C# тилінде 319 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 319;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 319 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 319;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
836,413 | en | Java | var_decl | beginner | How to declare a variable size with value 211059 in Java? | int size = 211059; | ### Instruction:
How to declare a variable size with value 211059 in Java?
### Response:
int size = 211059; |
13,642,935 | 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() |
1,132,550 | kk | C# | var_decl | beginner | C# тілінде 304759 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 304759; | ### Instruction:
C# тілінде 304759 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 304759; |
69,499,305 | 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();
} |
44,753,481 | kk | Python | logic_ops | intermediate | Python тилінде 76 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 76
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 76 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 76
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
45,261,756 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
75,442,679 | en | Unity | logic_ops | advanced | Write a function that determines if the number 498 is prime in Unity. | public bool IsPrime() {
int n = 498;
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 498 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 498;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,007,283 | kk | Python | var_decl | beginner | Python тілінде 896815 мәнімен index айнымалысын қалай жариялауға болады? | index = 896815 | ### Instruction:
Python тілінде 896815 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 896815 |
99,520,869 | 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;
} |
2,940,876 | en | C++ | var_decl | beginner | How to declare a variable count with value 23579 in C++? | int count = 23579; | ### Instruction:
How to declare a variable count with value 23579 in C++?
### Response:
int count = 23579; |
56,467,229 | en | JavaScript | array_ops | advanced | 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); |
57,105,529 | en | Java | logic_ops | intermediate | Write logic to check if the year 2015 is a leap year in Java. | public bool IsLeap() {
int y = 2015;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2015 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2015;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
44,574,303 | kk | Unity | array_ops | intermediate | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
1,705,007 | kk | C++ | var_decl | beginner | C++ тілінде 400241 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 400241; | ### Instruction:
C++ тілінде 400241 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 400241; |
47,307,760 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 60 простым. | public bool IsPrime() {
int n = 60;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 60 простым.
### Response:
public bool IsPrime() {
int n = 60;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
78,633,856 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 270 простым. | public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 270 простым.
### Response:
public bool IsPrime() {
int n = 270;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
389,605 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 2679-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(2679) << std::endl; | ### Instruction:
C++ тілінде 1-ден 2679-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(2679) << std::endl; |
17,566,453 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
3,515,849 | kk | Unity | var_decl | beginner | Unity тілінде 661271 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 661271; | ### Instruction:
Unity тілінде 661271 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 661271; |
3,186,824 | en | Java | var_decl | beginner | How to declare a variable size with value 521976 in Java? | int size = 521976; | ### Instruction:
How to declare a variable size with value 521976 in Java?
### Response:
int size = 521976; |
79,452,850 | 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);
} |
1,171,850 | kk | C++ | var_decl | beginner | C++ тілінде 847948 мәнімен x айнымалысын қалай жариялауға болады? | int x = 847948; | ### Instruction:
C++ тілінде 847948 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 847948; |
519 | kk | C++ | comment | beginner | C++ кодында "Жұмысқа дайын" түсініктемесін қалай жазуға болады? | // Жұмысқа дайын | ### Instruction:
C++ кодында "Жұмысқа дайын" түсініктемесін қалай жазуға болады?
### Response:
// Жұмысқа дайын |
183,502 | kk | Unity | factorial | advanced | Unity тілінде 4249 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4249));
} | ### Instruction:
Unity тілінде 4249 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4249));
} |
3,017,989 | ru | JavaScript | var_decl | beginner | Как объявить переменную limit со значением 459106 в JavaScript? | let limit = 459106; | ### Instruction:
Как объявить переменную limit со значением 459106 в JavaScript?
### Response:
let limit = 459106; |
47,493,079 | en | C# | logic_ops | advanced | Write logic to check if the year 2042 is a leap year in C#. | public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2042 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
85,745,805 | 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;
} |
1,322,405 | en | Unity | var_decl | beginner | How to declare a variable level with value 301429 in Unity? | int level = 301429; | ### Instruction:
How to declare a variable level with value 301429 in Unity?
### Response:
int level = 301429; |
3,062,792 | kk | C++ | var_decl | beginner | C++ тілінде 258759 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 258759; | ### Instruction:
C++ тілінде 258759 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 258759; |
14,061,023 | en | Java | logic_ops | intermediate | Write logic to check if the year 1995 is a leap year in Java. | public bool IsLeap() {
int y = 1995;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1995 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1995;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
50,647,368 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
4,023,550 | kk | Python | var_decl | beginner | Python тілінде 210709 мәнімен level айнымалысын қалай жариялауға болады? | level = 210709 | ### Instruction:
Python тілінде 210709 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
level = 210709 |
50,311,382 | 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;
} |
33,241,528 | 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;
} |
42,567,807 | 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); |
14,489,916 | 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] |
3,247,232 | ru | C# | var_decl | beginner | Как объявить переменную buffer со значением 244062 в C#? | int buffer = 244062; | ### Instruction:
Как объявить переменную buffer со значением 244062 в C#?
### Response:
int buffer = 244062; |
58,715,671 | 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;
} |
20,804,028 | en | JavaScript | array_ops | advanced | 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); |
3,288,224 | kk | Unity | var_decl | beginner | Unity тілінде 427528 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 427528; | ### Instruction:
Unity тілінде 427528 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 427528; |
64,539,320 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 359 простым. | public bool IsPrime() {
int n = 359;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 359 простым.
### Response:
public bool IsPrime() {
int n = 359;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
95,721,453 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2011 високосным. | public bool IsLeap() {
int y = 2011;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2011 високосным.
### Response:
public bool IsLeap() {
int y = 2011;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,705,726 | ru | JavaScript | var_decl | beginner | Как объявить переменную result со значением 217562 в JavaScript? | let result = 217562; | ### Instruction:
Как объявить переменную result со значением 217562 в JavaScript?
### Response:
let result = 217562; |
73,701,849 | 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,664,162 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 404 простым. | public bool IsPrime() {
int n = 404;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 404 простым.
### Response:
public bool IsPrime() {
int n = 404;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
27,298,027 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1988;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1988 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1988;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
53,168 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 8130. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(8130)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 8130.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(8130)); |
41,166,727 | en | Python | array_ops | advanced | 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] |
95,615,713 | 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;
} |
73,329,128 | 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(); |
639,806 | kk | C# | var_decl | beginner | C# тілінде 601597 мәнімен result айнымалысын қалай жариялауға болады? | int result = 601597; | ### Instruction:
C# тілінде 601597 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 601597; |
3,198,758 | kk | Unity | var_decl | beginner | Unity тілінде 643598 мәнімен size айнымалысын қалай жариялауға болады? | int size = 643598; | ### Instruction:
Unity тілінде 643598 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 643598; |
74,987,576 | en | C# | logic_ops | intermediate | Write logic to check if the year 1938 is a leap year in C#. | public bool IsLeap() {
int y = 1938;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1938 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1938;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,375,159 | ru | C# | var_decl | beginner | Как объявить переменную count со значением 248275 в C#? | int count = 248275; | ### Instruction:
Как объявить переменную count со значением 248275 в C#?
### Response:
int count = 248275; |
560,525 | en | Java | var_decl | beginner | How to declare a variable timer with value 866785 in Java? | int timer = 866785; | ### Instruction:
How to declare a variable timer with value 866785 in Java?
### Response:
int timer = 866785; |
63,378,847 | kk | Java | logic_ops | advanced | Java тилінде 1995 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1995;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1995 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1995;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
64,712,197 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
4,211,813 | kk | Java | var_decl | beginner | Java тілінде 29876 мәнімен value айнымалысын қалай жариялауға болады? | int value = 29876; | ### Instruction:
Java тілінде 29876 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 29876; |
39,423,265 | 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;
} |
25,836,541 | ru | 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;
} |
172,391 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 4737. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4737)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 4737.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4737)); |
152,679 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 6829. | 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(6829) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 6829.
### 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(6829) << std::endl; |
1,660,489 | en | Java | var_decl | beginner | How to declare a variable amount with value 894691 in Java? | int amount = 894691; | ### Instruction:
How to declare a variable amount with value 894691 in Java?
### Response:
int amount = 894691; |
21,177,039 | en | Java | array_ops | advanced | 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;
} |
529,542 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 3062. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(3062) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 3062.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(3062) << std::endl; |
57,544,286 | 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] |
933,896 | kk | Java | var_decl | beginner | Java тілінде 751945 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 751945; | ### Instruction:
Java тілінде 751945 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 751945; |
64,277,952 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
343,834 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 1505. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(1505)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 1505.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(1505)); |
44,586,303 | kk | C++ | logic_ops | advanced | C++ тилінде 245 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 245;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 245 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 245;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
34,318,065 | 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,180,978 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 834818 in JavaScript? | let level = 834818; | ### Instruction:
How to declare a variable level with value 834818 in JavaScript?
### Response:
let level = 834818; |
76,537,125 | ru | Python | string_ops | intermediate | Напишите на 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аеёиоуыэюя') |
22,679,745 | en | C++ | logic_ops | advanced | Write logic to check if the year 2031 is a leap year in C++. | public bool IsLeap() {
int y = 2031;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2031 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2031;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,970,618 | en | Python | var_decl | beginner | How to declare a variable size with value 908639 in Python? | size = 908639 | ### Instruction:
How to declare a variable size with value 908639 in Python?
### Response:
size = 908639 |
44,319,139 | 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;
} |
611,470 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 5620. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5620));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5620.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5620));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.