id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
4,285,727
ru
Java
var_decl
beginner
Как объявить переменную score со значением 21304 в Java?
int score = 21304;
### Instruction: Как объявить переменную score со значением 21304 в Java? ### Response: int score = 21304;
39,761,074
en
C#
logic_ops
intermediate
Write logic to check if the year 1967 is a leap year in C#.
public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1967 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,768,053
kk
Unity
var_decl
beginner
Unity тілінде 605170 мәнімен health айнымалысын қалай жариялауға болады?
int health = 605170;
### Instruction: Unity тілінде 605170 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 605170;
1,805,438
en
Unity
var_decl
beginner
How to declare a variable weight with value 40713 in Unity?
int weight = 40713;
### Instruction: How to declare a variable weight with value 40713 in Unity? ### Response: int weight = 40713;
37,703,137
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; }
53,941,241
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,998,337
kk
Unity
var_decl
beginner
Unity тілінде 885101 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 885101;
### Instruction: Unity тілінде 885101 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 885101;
49,245,790
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]
52,997
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 1666.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1666)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 1666. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1666)); }
45,428,426
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
74,433,327
en
Unity
logic_ops
intermediate
Write logic to check if the year 2093 is a leap year in Unity.
public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2093 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2093; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,731,784
ru
Python
var_decl
beginner
Как объявить переменную speed со значением 742603 в Python?
speed = 742603
### Instruction: Как объявить переменную speed со значением 742603 в Python? ### Response: speed = 742603
37,855,053
ru
Java
string_ops
advanced
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
13,569,229
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,757,509
en
C++
var_decl
beginner
How to declare a variable rate with value 669759 in C++?
int rate = 669759;
### Instruction: How to declare a variable rate with value 669759 in C++? ### Response: int rate = 669759;
61,068
kk
Python
sum_n
intermediate
Python тілінде 1-ден 1219-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1219))
### Instruction: Python тілінде 1-ден 1219-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1219))
78,649,304
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
87,336,703
kk
Unity
logic_ops
intermediate
Unity тилінде 164 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 164 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
74,373,267
en
C++
logic_ops
advanced
Write logic to check if the year 1930 is a leap year in C++.
public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1930 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,217,626
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 25945 в Python?
limit = 25945
### Instruction: Как объявить переменную limit со значением 25945 в Python? ### Response: limit = 25945
65,901,476
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
87,320,678
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]
36,091,846
en
C#
logic_ops
advanced
Write logic to check if the year 1951 is a leap year in C#.
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 C#. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,152,284
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; }
14,584,919
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]
44,326,231
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; }
36,593,015
en
Java
logic_ops
intermediate
Write a function that determines if the number 444 is prime in Java.
public bool IsPrime() { int n = 444; 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 444 is prime in Java. ### Response: public bool IsPrime() { int n = 444; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,216,708
en
C#
array_ops
intermediate
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,609,684
en
JavaScript
var_decl
beginner
How to declare a variable health with value 610879 in JavaScript?
let health = 610879;
### Instruction: How to declare a variable health with value 610879 in JavaScript? ### Response: let health = 610879;
68,041,284
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; }
30,903,720
en
C#
logic_ops
intermediate
Write a function that determines if the number 254 is prime in C#.
public bool IsPrime() { int n = 254; 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 254 is prime in C#. ### Response: public bool IsPrime() { int n = 254; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,582,326
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,367,386
kk
Python
var_decl
beginner
Python тілінде 879551 мәнімен health айнымалысын қалай жариялауға болады?
health = 879551
### Instruction: Python тілінде 879551 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 879551
59,682,818
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; }
507,581
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 4651.
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(4651) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 4651. ### 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(4651) << std::endl;
508,236
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 9596-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9596)); }
### Instruction: Unity тілінде 1-ден 9596-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9596)); }
24,994,810
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 385 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 385; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 385 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 385; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,671,905
ru
Java
var_decl
beginner
Как объявить переменную y со значением 211529 в Java?
int y = 211529;
### Instruction: Как объявить переменную y со значением 211529 в Java? ### Response: int y = 211529;
38,698,867
kk
Unity
array_ops
advanced
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
36,292,283
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
68,631,516
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; }
3,922,861
kk
C#
var_decl
beginner
C# тілінде 444765 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 444765;
### Instruction: C# тілінде 444765 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 444765;
81,537,134
kk
C++
logic_ops
advanced
C++ тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 146; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 146; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,744,639
kk
C++
var_decl
beginner
C++ тілінде 363302 мәнімен result айнымалысын қалай жариялауға болады?
int result = 363302;
### Instruction: C++ тілінде 363302 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 363302;
409,711
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 4967.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4967))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 4967. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4967))
899,801
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 480116 в Unity?
int result = 480116;
### Instruction: Как объявить переменную result со значением 480116 в Unity? ### Response: int result = 480116;
1,497,754
kk
Unity
var_decl
beginner
Unity тілінде 163460 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 163460;
### Instruction: Unity тілінде 163460 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 163460;
52,996,698
en
Unity
string_ops
intermediate
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
540,401
en
Unity
var_decl
beginner
How to declare a variable x with value 955 in Unity?
int x = 955;
### Instruction: How to declare a variable x with value 955 in Unity? ### Response: int x = 955;
3,499,312
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 525655 в JavaScript?
let rate = 525655;
### Instruction: Как объявить переменную rate со значением 525655 в JavaScript? ### Response: let rate = 525655;
3,406,056
ru
Python
var_decl
beginner
Как объявить переменную y со значением 202931 в Python?
y = 202931
### Instruction: Как объявить переменную y со значением 202931 в Python? ### Response: y = 202931
92,002,692
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
172,273
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 2792.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2792));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 2792. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2792));
49,647,700
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); }
3,561,821
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 173710 в Unity?
int buffer = 173710;
### Instruction: Как объявить переменную buffer со значением 173710 в Unity? ### Response: int buffer = 173710;
71,406,402
kk
C++
logic_ops
intermediate
C++ тилінде 80 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 80 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,504,686
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; }
15,766,552
kk
Python
logic_ops
advanced
Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 97 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 97 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,713,222
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 315025 в JavaScript?
let count = 315025;
### Instruction: Как объявить переменную count со значением 315025 в JavaScript? ### Response: let count = 315025;
3,741,731
en
Python
var_decl
beginner
How to declare a variable offset with value 112457 in Python?
offset = 112457
### Instruction: How to declare a variable offset with value 112457 in Python? ### Response: offset = 112457
2,490,996
kk
Unity
var_decl
beginner
Unity тілінде 173309 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 173309;
### Instruction: Unity тілінде 173309 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 173309;
50,743
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 9121.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9121));
### Instruction: Write a function in JavaScript that calculates the factorial of 9121. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9121));
68,317,827
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
43,397,920
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; }
74,358,997
kk
C++
logic_ops
intermediate
C++ тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,833,579
en
C++
logic_ops
advanced
Write a function that determines if the number 410 is prime in C++.
public bool IsPrime() { int n = 410; 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 410 is prime in C++. ### Response: public bool IsPrime() { int n = 410; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
72,199,537
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; }
97,006,367
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; }
17,948,867
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1926 високосным.
function isLeap() { let y = 1926; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1926 високосным. ### Response: function isLeap() { let y = 1926; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
66,096,963
ru
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; }
42,165,925
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; }
28,040,461
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 233 простым.
public bool IsPrime() { int n = 233; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 233 простым. ### Response: public bool IsPrime() { int n = 233; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
20,421,149
kk
Unity
array_ops
advanced
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
260,647
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 306.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(306) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 306. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(306) << std::endl;
18,906,954
en
C#
array_ops
advanced
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; }
77,832,372
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
18,318,759
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
726,824
en
Java
var_decl
beginner
How to declare a variable timer with value 181045 in Java?
int timer = 181045;
### Instruction: How to declare a variable timer with value 181045 in Java? ### Response: int timer = 181045;
36,340,914
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 429 простым.
public bool IsPrime() { int n = 429; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 429 простым. ### Response: public bool IsPrime() { int n = 429; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
95,293,314
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; }
61,494,168
kk
Unity
logic_ops
advanced
Unity тилінде 221 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 221; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 221 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 221; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,500,898
kk
Unity
var_decl
beginner
Unity тілінде 266822 мәнімен total айнымалысын қалай жариялауға болады?
int total = 266822;
### Instruction: Unity тілінде 266822 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 266822;
174,081
kk
JavaScript
factorial
advanced
JavaScript тілінде 6326 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6326));
### Instruction: JavaScript тілінде 6326 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6326));
20,729,038
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; }
3,252,073
kk
JavaScript
var_decl
beginner
JavaScript тілінде 61274 мәнімен data айнымалысын қалай жариялауға болады?
let data = 61274;
### Instruction: JavaScript тілінде 61274 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 61274;
86,433,745
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('');
20,297,396
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(); }
455,975
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 3968.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3968));
### Instruction: Write a function in Java that sums numbers from 1 to 3968. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3968));
2,493,082
en
Unity
var_decl
beginner
How to declare a variable result with value 214383 in Unity?
int result = 214383;
### Instruction: How to declare a variable result with value 214383 in Unity? ### Response: int result = 214383;
43,563,444
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]
15,871,882
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()
4,523,477
kk
Python
var_decl
beginner
Python тілінде 827066 мәнімен y айнымалысын қалай жариялауға болады?
y = 827066
### Instruction: Python тілінде 827066 мәнімен y айнымалысын қалай жариялауға болады? ### Response: y = 827066
21,053,159
en
Unity
logic_ops
intermediate
Write logic to check if the year 2064 is a leap year in Unity.
public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2064 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
441,602
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 9201.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9201));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 9201. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9201));
535,589
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 3281.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3281));
### Instruction: Write a function in JavaScript that calculates the factorial of 3281. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3281));
589,010
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 9507.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9507));
### Instruction: Write a function in Java that sums numbers from 1 to 9507. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9507));
2,790,966
ru
Python
var_decl
beginner
Как объявить переменную count со значением 162937 в Python?
count = 162937
### Instruction: Как объявить переменную count со значением 162937 в Python? ### Response: count = 162937
96,066,296
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; }
3,445,963
en
Python
var_decl
beginner
How to declare a variable data with value 402182 in Python?
data = 402182
### Instruction: How to declare a variable data with value 402182 in Python? ### Response: data = 402182
43,815,321
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]