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
1,782,780
en
C#
var_decl
beginner
How to declare a variable timer with value 177783 in C#?
int timer = 177783;
### Instruction: How to declare a variable timer with value 177783 in C#? ### Response: int timer = 177783;
20,652,542
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; }
84,344,440
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; }
39,782,369
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 473 простым.
public bool IsPrime() { int n = 473; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 473 простым. ### Response: public bool IsPrime() { int n = 473; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
74,213,730
en
Python
array_ops
intermediate
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]
41,988,836
ru
C++
logic_ops
advanced
Напишите на 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; }
66,094,126
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
86,425
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 618.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(618));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 618. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(618));
93,221,869
en
C#
logic_ops
intermediate
Write logic to check if the year 1940 is a leap year in C#.
public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1940 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
20,931,942
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]
1,146,156
kk
Unity
var_decl
beginner
Unity тілінде 362664 мәнімен level айнымалысын қалай жариялауға болады?
int level = 362664;
### Instruction: Unity тілінде 362664 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 362664;
20,535,429
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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; }
54,463,555
kk
C++
logic_ops
intermediate
C++ тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2058 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,909,607
en
Java
string_ops
advanced
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
63,954,624
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 199 простым.
public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 199 простым. ### Response: public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
42,713,079
en
C#
logic_ops
intermediate
Write logic to check if the year 1927 is a leap year in C#.
public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1927 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
40,191,331
kk
C++
logic_ops
advanced
C++ тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 286; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
63,152,968
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; }
3,646,099
en
JavaScript
var_decl
beginner
How to declare a variable result with value 271644 in JavaScript?
let result = 271644;
### Instruction: How to declare a variable result with value 271644 in JavaScript? ### Response: let result = 271644;
28,401
kk
C#
sum_n
intermediate
C# тілінде 1-ден 8406-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8406));
### Instruction: C# тілінде 1-ден 8406-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8406));
38,038,129
kk
C++
string_ops
intermediate
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
93,271,445
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
12,846,082
en
C++
logic_ops
advanced
Write a function that determines if the number 313 is prime in C++.
public bool IsPrime() { int n = 313; 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 313 is prime in C++. ### Response: public bool IsPrime() { int n = 313; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
404,426
en
JavaScript
var_decl
beginner
How to declare a variable total with value 514840 in JavaScript?
let total = 514840;
### Instruction: How to declare a variable total with value 514840 in JavaScript? ### Response: let total = 514840;
61,079,755
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
34,073,027
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; }
102,686
en
Java
var_decl
beginner
How to declare a variable count with value 760324 in Java?
int count = 760324;
### Instruction: How to declare a variable count with value 760324 in Java? ### Response: int count = 760324;
146,663
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 1054.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1054));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 1054. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1054));
274,367
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 9611.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9611));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 9611. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(9611));
28,617,407
en
JavaScript
string_ops
intermediate
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;
44,575,221
kk
Unity
logic_ops
advanced
Unity тилінде 2007 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2007; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2007 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2007; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,939,285
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); }
97,039,476
en
C#
array_ops
advanced
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
234,361
kk
Unity
factorial
advanced
Unity тілінде 6603 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6603)); }
### Instruction: Unity тілінде 6603 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6603)); }
3,813,538
en
JavaScript
var_decl
beginner
How to declare a variable result with value 907006 in JavaScript?
let result = 907006;
### Instruction: How to declare a variable result with value 907006 in JavaScript? ### Response: let result = 907006;
53,530,620
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 48 простым.
public bool IsPrime() { int n = 48; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 48 простым. ### Response: public bool IsPrime() { int n = 48; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
147,658
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 8789.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8789));
### Instruction: Write a function in C# that sums numbers from 1 to 8789. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8789));
24,100,170
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
434,370
kk
C++
factorial
advanced
C++ тілінде 4540 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4540) << std::endl;
### Instruction: C++ тілінде 4540 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4540) << std::endl;
4,994,161
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 940634 в Java?
int weight = 940634;
### Instruction: Как объявить переменную weight со значением 940634 в Java? ### Response: int weight = 940634;
71,809,156
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1926 is a leap year in JavaScript.
function isLeap() { let y = 1926; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1926 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1926; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
48,351,045
en
C#
logic_ops
intermediate
Write logic to check if the year 2084 is a leap year in C#.
public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2084 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2084; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
69,602,911
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()
44,980,768
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,941,198
kk
C++
var_decl
beginner
C++ тілінде 842289 мәнімен count айнымалысын қалай жариялауға болады?
int count = 842289;
### Instruction: C++ тілінде 842289 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 842289;
26,716,409
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 328 простым.
public bool IsPrime() { int n = 328; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 328 простым. ### Response: public bool IsPrime() { int n = 328; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,726,730
kk
Python
var_decl
beginner
Python тілінде 711269 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 711269
### Instruction: Python тілінде 711269 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 711269
53,709,740
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 190 is prime in JavaScript.
function isPrime() { let n = 190; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 190 is prime in JavaScript. ### Response: function isPrime() { let n = 190; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,719,474
en
JavaScript
var_decl
beginner
How to declare a variable count with value 923884 in JavaScript?
let count = 923884;
### Instruction: How to declare a variable count with value 923884 in JavaScript? ### Response: let count = 923884;
824,369
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 1683.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1683));
### Instruction: Write a function in Java that sums numbers from 1 to 1683. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1683));
83,105,626
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; }
410,115
kk
C++
factorial
advanced
C++ тілінде 9475 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9475) << std::endl;
### Instruction: C++ тілінде 9475 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9475) << std::endl;
44,093,363
en
Python
logic_ops
advanced
Write logic to check if the year 1955 is a leap year in Python.
def is_leap(): year = 1955 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1955 is a leap year in Python. ### Response: def is_leap(): year = 1955 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
67,172,422
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); }
38,338,615
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2019 високосным.
public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2019 високосным. ### Response: public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,793,077
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; }
25,638,701
ru
Unity
array_ops
intermediate
Напишите на 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; }
21,090,320
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 330; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 330 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 330; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,181,846
kk
Python
var_decl
beginner
Python тілінде 866745 мәнімен size айнымалысын қалай жариялауға болады?
size = 866745
### Instruction: Python тілінде 866745 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 866745
60,957,594
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]
84,322,994
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 159 простым.
public bool IsPrime() { int n = 159; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 159 простым. ### Response: public bool IsPrime() { int n = 159; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
95,653,053
en
C#
logic_ops
intermediate
Write logic to check if the year 2080 is a leap year in C#.
public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2080 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,272,101
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; }
3,400,463
en
Java
var_decl
beginner
How to declare a variable buffer with value 480728 in Java?
int buffer = 480728;
### Instruction: How to declare a variable buffer with value 480728 in Java? ### Response: int buffer = 480728;
38,858,192
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1989 високосным.
function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1989 високосным. ### Response: function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
752,611
ru
Python
var_decl
beginner
Как объявить переменную size со значением 774882 в Python?
size = 774882
### Instruction: Как объявить переменную size со значением 774882 в Python? ### Response: size = 774882
3,780,510
en
Python
var_decl
beginner
How to declare a variable data with value 477036 in Python?
data = 477036
### Instruction: How to declare a variable data with value 477036 in Python? ### Response: data = 477036
89,528,922
en
C#
logic_ops
advanced
Write logic to check if the year 2096 is a leap year in C#.
public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2096 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,746,211
en
Python
var_decl
beginner
How to declare a variable health with value 74196 in Python?
health = 74196
### Instruction: How to declare a variable health with value 74196 in Python? ### Response: health = 74196
272,727
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 6616.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6616)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 6616. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6616)); }
3,050,949
kk
Unity
var_decl
beginner
Unity тілінде 843314 мәнімен level айнымалысын қалай жариялауға болады?
int level = 843314;
### Instruction: Unity тілінде 843314 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 843314;
2,630,115
kk
Java
var_decl
beginner
Java тілінде 216721 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 216721;
### Instruction: Java тілінде 216721 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 216721;
4,975,176
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 208654 in JavaScript?
let timer = 208654;
### Instruction: How to declare a variable timer with value 208654 in JavaScript? ### Response: let timer = 208654;
3,444,536
kk
Unity
var_decl
beginner
Unity тілінде 989198 мәнімен y айнымалысын қалай жариялауға болады?
int y = 989198;
### Instruction: Unity тілінде 989198 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 989198;
3,271,122
kk
C++
var_decl
beginner
C++ тілінде 502430 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 502430;
### Instruction: C++ тілінде 502430 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 502430;
1,477,399
kk
Unity
var_decl
beginner
Unity тілінде 785169 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 785169;
### Instruction: Unity тілінде 785169 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 785169;
42,443,865
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1950 високосным.
def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1950 високосным. ### Response: def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
23,050,931
ru
Java
array_ops
intermediate
Напишите на 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,270,852
en
Java
var_decl
beginner
How to declare a variable health with value 241304 in Java?
int health = 241304;
### Instruction: How to declare a variable health with value 241304 in Java? ### Response: int health = 241304;
4,108,135
kk
Java
var_decl
beginner
Java тілінде 665716 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 665716;
### Instruction: Java тілінде 665716 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 665716;
17,270,072
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();
376,600
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 9546.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9546) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 9546. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9546) << std::endl;
64,206,381
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
113,109
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 2506.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2506));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 2506. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2506));
317,039
kk
Unity
var_decl
beginner
Unity тілінде 650041 мәнімен level айнымалысын қалай жариялауға болады?
int level = 650041;
### Instruction: Unity тілінде 650041 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 650041;
96,613,735
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
1,433,437
kk
JavaScript
var_decl
beginner
JavaScript тілінде 904203 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 904203;
### Instruction: JavaScript тілінде 904203 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 904203;
91,397,748
en
C++
logic_ops
advanced
Write logic to check if the year 2065 is a leap year in C++.
public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2065 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2065; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
206,709
kk
Unity
factorial
advanced
Unity тілінде 2673 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2673)); }
### Instruction: Unity тілінде 2673 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2673)); }
77,760,399
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('');
4,406,010
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 142422 в Unity?
int timer = 142422;
### Instruction: Как объявить переменную timer со значением 142422 в Unity? ### Response: int timer = 142422;
2,156,808
ru
C++
var_decl
beginner
Как объявить переменную data со значением 708353 в C++?
int data = 708353;
### Instruction: Как объявить переменную data со значением 708353 в C++? ### Response: int data = 708353;
24,383,328
ru
Java
array_ops
intermediate
Напишите на 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; }
49,681,500
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
32,066,890
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
384,225
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 953.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(953));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 953. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(953));
57,347,706
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; }
2,020,447
en
Python
var_decl
beginner
How to declare a variable size with value 751991 in Python?
size = 751991
### Instruction: How to declare a variable size with value 751991 in Python? ### Response: size = 751991
41,773,189
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; }
1,507,190
en
Java
var_decl
beginner
How to declare a variable level with value 356345 in Java?
int level = 356345;
### Instruction: How to declare a variable level with value 356345 in Java? ### Response: int level = 356345;