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
81,572,939
kk
Java
logic_ops
advanced
Java тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2012 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
81,311,968
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 367 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 367; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 367 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 367; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,381,614
kk
C#
var_decl
beginner
C# тілінде 480467 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 480467;
### Instruction: C# тілінде 480467 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 480467;
2,648,728
kk
C#
var_decl
beginner
C# тілінде 159824 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 159824;
### Instruction: C# тілінде 159824 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 159824;
71,479,980
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,084,824
en
Unity
var_decl
beginner
How to declare a variable level with value 329717 in Unity?
int level = 329717;
### Instruction: How to declare a variable level with value 329717 in Unity? ### Response: int level = 329717;
21,812,105
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; }
91,709,640
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
83,456,246
kk
Java
array_ops
advanced
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
218,662
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 4768-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(4768) << std::endl;
### Instruction: C++ тілінде 1-ден 4768-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(4768) << std::endl;
775,618
kk
JavaScript
var_decl
beginner
JavaScript тілінде 539750 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 539750;
### Instruction: JavaScript тілінде 539750 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 539750;
45,739,132
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
66,293,353
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
46,892,941
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; }
76,925,899
kk
C#
array_ops
intermediate
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
79,279,156
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
675,646
kk
Java
sum_n
intermediate
Java тілінде 1-ден 5917-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5917));
### Instruction: Java тілінде 1-ден 5917-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5917));
28,693,661
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
22,773,817
ru
C#
array_ops
advanced
Напишите на C# функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C# функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
24,625,391
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; }
42,610,238
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
1,231,672
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 380659 в C#?
int buffer = 380659;
### Instruction: Как объявить переменную buffer со значением 380659 в C#? ### Response: int buffer = 380659;
550,582
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 1193.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1193)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 1193. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1193)); }
65,806,705
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2086 високосным.
def is_leap(): year = 2086 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2086 високосным. ### Response: def is_leap(): year = 2086 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
66,444,060
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
69,014,823
kk
C++
string_ops
advanced
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
76,937,159
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
90,195,727
kk
Python
logic_ops
advanced
Python тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2051 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2051 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
36,797,103
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,736,899
en
Unity
var_decl
beginner
How to declare a variable buffer with value 86951 in Unity?
int buffer = 86951;
### Instruction: How to declare a variable buffer with value 86951 in Unity? ### Response: int buffer = 86951;
626,049
kk
Java
var_decl
beginner
Java тілінде 60694 мәнімен score айнымалысын қалай жариялауға болады?
int score = 60694;
### Instruction: Java тілінде 60694 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 60694;
70,063,573
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 76 простым.
def is_prime(): n = 76 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 76 простым. ### Response: def is_prime(): n = 76 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
345,777
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 554382 в Java?
int amount = 554382;
### Instruction: Как объявить переменную amount со значением 554382 в Java? ### Response: int amount = 554382;
14,116,301
kk
C++
string_ops
advanced
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,762,625
ru
Python
var_decl
beginner
Как объявить переменную health со значением 677814 в Python?
health = 677814
### Instruction: Как объявить переменную health со значением 677814 в Python? ### Response: health = 677814
40,864,418
en
C#
logic_ops
intermediate
Write a function that determines if the number 453 is prime in C#.
public bool IsPrime() { int n = 453; 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 453 is prime in C#. ### Response: public bool IsPrime() { int n = 453; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
90,239,179
en
Java
array_ops
intermediate
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; }
2,724,231
en
JavaScript
var_decl
beginner
How to declare a variable health with value 438651 in JavaScript?
let health = 438651;
### Instruction: How to declare a variable health with value 438651 in JavaScript? ### Response: let health = 438651;
62,214,992
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
98,425,094
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; }
47,740,026
kk
Unity
logic_ops
intermediate
Unity тилінде 288 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 288; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 288 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 288; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
52,007,712
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
97,235,388
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
49,832,485
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,773,784
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 813455 в Unity?
int rate = 813455;
### Instruction: Как объявить переменную rate со значением 813455 в Unity? ### Response: int rate = 813455;
18,313,513
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
1,515,548
en
C#
var_decl
beginner
How to declare a variable x with value 288941 in C#?
int x = 288941;
### Instruction: How to declare a variable x with value 288941 in C#? ### Response: int x = 288941;
46,091
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 6532.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6532))
### Instruction: Write a function in Python that calculates the factorial of 6532. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6532))
949,820
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 812757 в Unity?
int timer = 812757;
### Instruction: Как объявить переменную timer со значением 812757 в Unity? ### Response: int timer = 812757;
1,829,508
en
C#
var_decl
beginner
How to declare a variable data with value 737065 in C#?
int data = 737065;
### Instruction: How to declare a variable data with value 737065 in C#? ### Response: int data = 737065;
532,831
ru
C++
var_decl
beginner
Как объявить переменную data со значением 438579 в C++?
int data = 438579;
### Instruction: Как объявить переменную data со значением 438579 в C++? ### Response: int data = 438579;
2,096,703
ru
Python
var_decl
beginner
Как объявить переменную amount со значением 950645 в Python?
amount = 950645
### Instruction: Как объявить переменную amount со значением 950645 в Python? ### Response: amount = 950645
60,700,761
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
48,373,230
kk
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; }
1,515,824
kk
C#
var_decl
beginner
C# тілінде 664098 мәнімен health айнымалысын қалай жариялауға болады?
int health = 664098;
### Instruction: C# тілінде 664098 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 664098;
31,716,322
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
96,095,789
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); }
13,945,588
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1931 is a leap year in JavaScript.
function isLeap() { let y = 1931; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1931 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1931; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
29,707,377
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]
17,762,689
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; }
10,784,197
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; }
44,476,985
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
74,842,765
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; }
3,107,516
en
JavaScript
var_decl
beginner
How to declare a variable x with value 572081 in JavaScript?
let x = 572081;
### Instruction: How to declare a variable x with value 572081 in JavaScript? ### Response: let x = 572081;
68,581,634
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
61,221,841
kk
C++
logic_ops
intermediate
C++ тилінде 1907 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1907 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1907; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
34,129,518
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; }
92,339,073
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]
4,124,686
en
Unity
var_decl
beginner
How to declare a variable value with value 133210 in Unity?
int value = 133210;
### Instruction: How to declare a variable value with value 133210 in Unity? ### Response: int value = 133210;
99,838,944
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
18,113,558
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
25,487,459
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,920,479
kk
C#
var_decl
beginner
C# тілінде 613901 мәнімен count айнымалысын қалай жариялауға болады?
int count = 613901;
### Instruction: C# тілінде 613901 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 613901;
93,146,399
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
150,498
en
Java
var_decl
beginner
How to declare a variable timer with value 368285 in Java?
int timer = 368285;
### Instruction: How to declare a variable timer with value 368285 in Java? ### Response: int timer = 368285;
3,683,551
en
Python
var_decl
beginner
How to declare a variable level with value 533526 in Python?
level = 533526
### Instruction: How to declare a variable level with value 533526 in Python? ### Response: level = 533526
19,961,487
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; }
78,352,755
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
76,029,861
kk
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; }
2,030,108
kk
C++
var_decl
beginner
C++ тілінде 999324 мәнімен data айнымалысын қалай жариялауға болады?
int data = 999324;
### Instruction: C++ тілінде 999324 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 999324;
743,472
ru
C#
var_decl
beginner
Как объявить переменную data со значением 389308 в C#?
int data = 389308;
### Instruction: Как объявить переменную data со значением 389308 в C#? ### Response: int data = 389308;
76,284,459
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 146; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 146 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 146; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
86,032,494
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 332 простым.
public bool IsPrime() { int n = 332; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 332 простым. ### Response: public bool IsPrime() { int n = 332; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
48,574,528
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
29,030,177
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]
66,770,382
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 297 простым.
public bool IsPrime() { int n = 297; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 297 простым. ### Response: public bool IsPrime() { int n = 297; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
187,761
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 9966.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9966));
### Instruction: Write a function in JavaScript that calculates the factorial of 9966. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9966));
25,231,408
kk
C++
string_ops
advanced
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
95,830,754
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; }
92,805,341
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 171 простым.
public bool IsPrime() { int n = 171; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 171 простым. ### Response: public bool IsPrime() { int n = 171; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,109,547
kk
Java
var_decl
beginner
Java тілінде 486434 мәнімен result айнымалысын қалай жариялауға болады?
int result = 486434;
### Instruction: Java тілінде 486434 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 486434;
3,570,936
ru
Java
var_decl
beginner
Как объявить переменную result со значением 565778 в Java?
int result = 565778;
### Instruction: Как объявить переменную result со значением 565778 в Java? ### Response: int result = 565778;
1,470,142
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 347679 в Python?
weight = 347679
### Instruction: Как объявить переменную weight со значением 347679 в Python? ### Response: weight = 347679
21,319,144
en
C#
logic_ops
advanced
Write a function that determines if the number 56 is prime in C#.
public bool IsPrime() { int n = 56; 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 56 is prime in C#. ### Response: public bool IsPrime() { int n = 56; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
35,410,702
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
126,537
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 2644.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2644))
### Instruction: Write a function in Python that calculates the factorial of 2644. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(2644))
19,468,307
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
3,875,965
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 679409 в JavaScript?
let score = 679409;
### Instruction: Как объявить переменную score со значением 679409 в JavaScript? ### Response: let score = 679409;
55,646
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 5741.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5741));
### Instruction: Write a function in JavaScript that calculates the factorial of 5741. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5741));
49,934,397
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();