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
479,822
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 1391.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1391));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 1391. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(1391));
81,604,877
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2020 високосным.
public bool IsLeap() { int y = 2020; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2020 високосным. ### Response: public bool IsLeap() { int y = 2020; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,966,304
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1982 високосным.
function isLeap() { let y = 1982; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1982 високосным. ### Response: function isLeap() { let y = 1982; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
96,332,131
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
76,105,286
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; }
68,344,224
kk
Unity
logic_ops
intermediate
Unity тилінде 2044 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2044; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2044 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2044; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
77,029,544
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 238 простым.
public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 238 простым. ### Response: public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,400,856
ru
Java
var_decl
beginner
Как объявить переменную value со значением 122462 в Java?
int value = 122462;
### Instruction: Как объявить переменную value со значением 122462 в Java? ### Response: int value = 122462;
79,303,044
en
Java
logic_ops
advanced
Write logic to check if the year 1951 is a leap year in Java.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1951 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
36,125,941
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(); }
11,838,418
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2039 is a leap year in JavaScript.
function isLeap() { let y = 2039; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2039 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2039; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
92,172,266
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
79,433,521
ru
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; }
2,314,582
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 896145 в JavaScript?
let count = 896145;
### Instruction: Как объявить переменную count со значением 896145 в JavaScript? ### Response: let count = 896145;
4,111,402
kk
Unity
var_decl
beginner
Unity тілінде 774716 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 774716;
### Instruction: Unity тілінде 774716 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 774716;
49,069,196
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; }
19,725,711
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); }
39,806,688
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; }
19,523,685
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(); }
74,490,401
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
28,578,704
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
18,802,650
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(); }
4,276,057
kk
C++
var_decl
beginner
C++ тілінде 481647 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 481647;
### Instruction: C++ тілінде 481647 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 481647;
88,045,837
kk
Python
logic_ops
intermediate
Python тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2018 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2018 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,798,839
kk
C#
var_decl
beginner
C# тілінде 614704 мәнімен index айнымалысын қалай жариялауға болады?
int index = 614704;
### Instruction: C# тілінде 614704 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 614704;
3,800,689
kk
JavaScript
var_decl
beginner
JavaScript тілінде 997012 мәнімен x айнымалысын қалай жариялауға болады?
let x = 997012;
### Instruction: JavaScript тілінде 997012 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 997012;
1,301,042
en
Unity
var_decl
beginner
How to declare a variable timer with value 193474 in Unity?
int timer = 193474;
### Instruction: How to declare a variable timer with value 193474 in Unity? ### Response: int timer = 193474;
93,407,794
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(); }
1,276,475
kk
Python
var_decl
beginner
Python тілінде 753107 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 753107
### Instruction: Python тілінде 753107 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 753107
78,418,595
ru
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; }
35,765,693
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 58 простым.
function isPrime() { let n = 58; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 58 простым. ### Response: function isPrime() { let n = 58; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,367,678
ru
Python
var_decl
beginner
Как объявить переменную y со значением 199607 в Python?
y = 199607
### Instruction: Как объявить переменную y со значением 199607 в Python? ### Response: y = 199607
62,937,135
en
Python
logic_ops
intermediate
Write a function that determines if the number 118 is prime in Python.
def is_prime(): n = 118 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 118 is prime in Python. ### Response: def is_prime(): n = 118 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
97,311,631
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]
23,023,729
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
59,722,107
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(); }
82,631,400
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
65,495,542
kk
C++
logic_ops
advanced
C++ тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2086; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2086; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
698,003
kk
C++
factorial
advanced
C++ тілінде 4221 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4221) << std::endl;
### Instruction: C++ тілінде 4221 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4221) << std::endl;
32,706,589
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
1,387,169
en
JavaScript
var_decl
beginner
How to declare a variable data with value 69493 in JavaScript?
let data = 69493;
### Instruction: How to declare a variable data with value 69493 in JavaScript? ### Response: let data = 69493;
65,770,275
kk
Unity
logic_ops
advanced
Unity тилінде 1995 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1995; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1995 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1995; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
12,266,538
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; }
2,402,082
ru
Java
var_decl
beginner
Как объявить переменную level со значением 32790 в Java?
int level = 32790;
### Instruction: Как объявить переменную level со значением 32790 в Java? ### Response: int level = 32790;
2,044,881
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 716106 in JavaScript?
let offset = 716106;
### Instruction: How to declare a variable offset with value 716106 in JavaScript? ### Response: let offset = 716106;
56,062,547
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2033 високосным.
public bool IsLeap() { int y = 2033; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2033 високосным. ### Response: public bool IsLeap() { int y = 2033; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,882,489
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; }
59,703,055
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,907,525
ru
C++
var_decl
beginner
Как объявить переменную speed со значением 774675 в C++?
int speed = 774675;
### Instruction: Как объявить переменную speed со значением 774675 в C++? ### Response: int speed = 774675;
65,729,577
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; }
89,815,396
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
26,330,422
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; }
70,208,273
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
32,494,555
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2021 високосным.
public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2021 високосным. ### Response: public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,063,416
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]
330,487
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 753-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(753)); }
### Instruction: Unity тілінде 1-ден 753-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(753)); }
72,211,402
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
39,203,938
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2034 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2034; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2034 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2034; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
64,962,010
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; }
246,036
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 3686.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3686));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 3686. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(3686));
4,374,550
kk
JavaScript
var_decl
beginner
JavaScript тілінде 437092 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 437092;
### Instruction: JavaScript тілінде 437092 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 437092;
1,087,752
kk
Unity
var_decl
beginner
Unity тілінде 578729 мәнімен size айнымалысын қалай жариялауға болады?
int size = 578729;
### Instruction: Unity тілінде 578729 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 578729;
67,714,445
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
54,047,062
kk
C++
logic_ops
intermediate
C++ тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 248; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 248 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 248; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
34,694,830
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
3,089,215
kk
JavaScript
var_decl
beginner
JavaScript тілінде 377144 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 377144;
### Instruction: JavaScript тілінде 377144 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 377144;
69,210,618
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1968 високосным.
public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1968 високосным. ### Response: public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,511,122
ru
C++
var_decl
beginner
Как объявить переменную total со значением 367197 в C++?
int total = 367197;
### Instruction: Как объявить переменную total со значением 367197 в C++? ### Response: int total = 367197;
621,611
kk
C++
var_decl
beginner
C++ тілінде 288821 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 288821;
### Instruction: C++ тілінде 288821 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 288821;
59,912,685
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; }
17,056,738
ru
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; }
49,608,137
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
54,531,042
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,923,111
kk
Java
var_decl
beginner
Java тілінде 815254 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 815254;
### Instruction: Java тілінде 815254 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 815254;
4,870,691
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 31273 в Unity?
int score = 31273;
### Instruction: Как объявить переменную score со значением 31273 в Unity? ### Response: int score = 31273;
2,663,949
en
C#
var_decl
beginner
How to declare a variable count with value 336664 in C#?
int count = 336664;
### Instruction: How to declare a variable count with value 336664 in C#? ### Response: int count = 336664;
1,386,618
en
Python
var_decl
beginner
How to declare a variable buffer with value 270233 in Python?
buffer = 270233
### Instruction: How to declare a variable buffer with value 270233 in Python? ### Response: buffer = 270233
17,449,829
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; }
2,772,920
en
JavaScript
var_decl
beginner
How to declare a variable x with value 606315 in JavaScript?
let x = 606315;
### Instruction: How to declare a variable x with value 606315 in JavaScript? ### Response: let x = 606315;
46,063,982
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(); }
77,773,452
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('');
3,540,675
kk
Python
var_decl
beginner
Python тілінде 691033 мәнімен count айнымалысын қалай жариялауға болады?
count = 691033
### Instruction: Python тілінде 691033 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 691033
15,253,691
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
11,932,889
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
45,602,861
kk
Python
logic_ops
advanced
Python тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
609,838
kk
Java
sum_n
intermediate
Java тілінде 1-ден 1230-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1230));
### Instruction: Java тілінде 1-ден 1230-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1230));
4,732,526
kk
C#
var_decl
beginner
C# тілінде 870802 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 870802;
### Instruction: C# тілінде 870802 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 870802;
98,907,226
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; }
4,169,777
en
C++
var_decl
beginner
How to declare a variable y with value 824019 in C++?
int y = 824019;
### Instruction: How to declare a variable y with value 824019 in C++? ### Response: int y = 824019;
75,827,621
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2018 високосным.
function isLeap() { let y = 2018; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2018 високосным. ### Response: function isLeap() { let y = 2018; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
96,069,930
kk
Python
array_ops
intermediate
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
37,927,926
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('');
4,689,462
en
JavaScript
var_decl
beginner
How to declare a variable index with value 956430 in JavaScript?
let index = 956430;
### Instruction: How to declare a variable index with value 956430 in JavaScript? ### Response: let index = 956430;
3,299,327
ru
C#
var_decl
beginner
Как объявить переменную x со значением 488827 в C#?
int x = 488827;
### Instruction: Как объявить переменную x со значением 488827 в C#? ### Response: int x = 488827;
70,962,265
en
Python
array_ops
intermediate
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
25,431,252
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; }
51,938,898
en
JavaScript
array_ops
advanced
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);
483,918
ru
Java
var_decl
beginner
Как объявить переменную total со значением 925273 в Java?
int total = 925273;
### Instruction: Как объявить переменную total со значением 925273 в Java? ### Response: int total = 925273;
53,327,307
kk
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аеёиоуыэюя')
2,608,286
en
C#
var_decl
beginner
How to declare a variable total with value 422042 in C#?
int total = 422042;
### Instruction: How to declare a variable total with value 422042 in C#? ### Response: int total = 422042;