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
45,873,608
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,242,805
kk
Java
var_decl
beginner
Java тілінде 175022 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 175022;
### Instruction: Java тілінде 175022 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 175022;
21,361,418
en
Java
string_ops
intermediate
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; }
293,123
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 6260-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6260)); }
### Instruction: Unity тілінде 1-ден 6260-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6260)); }
3,354,086
ru
Python
var_decl
beginner
Как объявить переменную health со значением 505915 в Python?
health = 505915
### Instruction: Как объявить переменную health со значением 505915 в Python? ### Response: health = 505915
98,110,214
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
10,282,473
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2016 високосным.
public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2016 високосным. ### Response: public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,038,787
ru
Python
var_decl
beginner
Как объявить переменную health со значением 886353 в Python?
health = 886353
### Instruction: Как объявить переменную health со значением 886353 в Python? ### Response: health = 886353
13,207,258
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
95,340,543
kk
Unity
logic_ops
intermediate
Unity тилінде 1994 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1994; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1994 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1994; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,935,964
kk
Unity
var_decl
beginner
Unity тілінде 586593 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 586593;
### Instruction: Unity тілінде 586593 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 586593;
4,772,634
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 676419 в Unity?
int weight = 676419;
### Instruction: Как объявить переменную weight со значением 676419 в Unity? ### Response: int weight = 676419;
641,885
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5215.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5215))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5215. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5215))
583,036
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 6244.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6244));
### Instruction: Write a function in JavaScript that calculates the factorial of 6244. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6244));
25,996,019
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]
54,673,843
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 95 простым.
public bool IsPrime() { int n = 95; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 95 простым. ### Response: public bool IsPrime() { int n = 95; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
316,613
kk
Java
factorial
advanced
Java тілінде 6936 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6936));
### Instruction: Java тілінде 6936 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6936));
2,135,163
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 143219 в JavaScript?
let buffer = 143219;
### Instruction: Как объявить переменную buffer со значением 143219 в JavaScript? ### Response: let buffer = 143219;
1,405,979
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 49382 в C++?
int offset = 49382;
### Instruction: Как объявить переменную offset со значением 49382 в C++? ### Response: int offset = 49382;
25,480,077
en
Java
logic_ops
advanced
Write a function that determines if the number 238 is prime in Java.
public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 238 is prime in Java. ### Response: public bool IsPrime() { int n = 238; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,779,911
kk
C++
logic_ops
advanced
C++ тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2072 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,168,344
en
C++
var_decl
beginner
How to declare a variable y with value 276067 in C++?
int y = 276067;
### Instruction: How to declare a variable y with value 276067 in C++? ### Response: int y = 276067;
1,613,280
en
Java
var_decl
beginner
How to declare a variable level with value 154289 in Java?
int level = 154289;
### Instruction: How to declare a variable level with value 154289 in Java? ### Response: int level = 154289;
56,265,071
en
Unity
string_ops
advanced
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; }
50,742,647
kk
Java
logic_ops
intermediate
Java тилінде 1921 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1921 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,474,455
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; }
38,038,518
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 49 простым.
public bool IsPrime() { int n = 49; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 49 простым. ### Response: public bool IsPrime() { int n = 49; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,385,402
en
C#
array_ops
intermediate
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); }
29,994,454
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);
76,563,008
en
C++
string_ops
advanced
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
53,706,942
kk
Unity
logic_ops
intermediate
Unity тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2043; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2043; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
15,299,495
kk
Java
logic_ops
advanced
Java тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,291,428
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; }
39,978,691
en
C#
logic_ops
intermediate
Write logic to check if the year 2083 is a leap year in C#.
public bool IsLeap() { int y = 2083; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2083 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2083; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
21,986,174
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 182 простым.
public bool IsPrime() { int n = 182; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 182 простым. ### Response: public bool IsPrime() { int n = 182; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
368,142
kk
Python
var_decl
beginner
Python тілінде 98685 мәнімен total айнымалысын қалай жариялауға болады?
total = 98685
### Instruction: Python тілінде 98685 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 98685
99,097,964
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 214 простым.
def is_prime(): n = 214 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 214 простым. ### Response: def is_prime(): n = 214 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
95,180,303
en
C++
logic_ops
intermediate
Write a function that determines if the number 118 is prime in C++.
public bool IsPrime() { int n = 118; 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 118 is prime in C++. ### Response: public bool IsPrime() { int n = 118; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
83,530,897
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1931 is a leap year in JavaScript.
function isLeap() { let y = 1931; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1931 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1931; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
76,029,988
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; }
1,756,946
ru
Java
var_decl
beginner
Как объявить переменную health со значением 8957 в Java?
int health = 8957;
### Instruction: Как объявить переменную health со значением 8957 в Java? ### Response: int health = 8957;
26,810,389
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; }
23,591,285
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2038 високосным.
function isLeap() { let y = 2038; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2038 високосным. ### Response: function isLeap() { let y = 2038; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
63,484,817
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; }
88,867,817
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; }
37,750,115
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
11,529,765
en
C#
logic_ops
intermediate
Write a function that determines if the number 334 is prime in C#.
public bool IsPrime() { int n = 334; 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 334 is prime in C#. ### Response: public bool IsPrime() { int n = 334; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
16,072,944
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; }
73,783,074
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,326,522
ru
C++
var_decl
beginner
Как объявить переменную count со значением 935400 в C++?
int count = 935400;
### Instruction: Как объявить переменную count со значением 935400 в C++? ### Response: int count = 935400;
65,954,194
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 17 простым.
public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 17 простым. ### Response: public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,177,714
kk
C#
string_ops
intermediate
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; }
57,878,215
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; }
83,316,769
kk
C#
logic_ops
intermediate
C# тилінде 350 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 350; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 350 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 350; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,899,483
kk
Unity
var_decl
beginner
Unity тілінде 50566 мәнімен size айнымалысын қалай жариялауға болады?
int size = 50566;
### Instruction: Unity тілінде 50566 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 50566;
88,177,400
ru
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; }
47,906,534
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2094 високосным.
public bool IsLeap() { int y = 2094; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2094 високосным. ### Response: public bool IsLeap() { int y = 2094; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,209,644
kk
Python
var_decl
beginner
Python тілінде 34737 мәнімен x айнымалысын қалай жариялауға болады?
x = 34737
### Instruction: Python тілінде 34737 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 34737
31,814,369
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 260 простым.
public bool IsPrime() { int n = 260; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 260 простым. ### Response: public bool IsPrime() { int n = 260; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,694,221
en
Python
array_ops
intermediate
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
3,319,696
kk
C++
var_decl
beginner
C++ тілінде 652734 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 652734;
### Instruction: C++ тілінде 652734 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 652734;
71,374,918
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); }
23,493,074
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;
80,997,635
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; }
1,964,163
ru
Python
var_decl
beginner
Как объявить переменную amount со значением 992311 в Python?
amount = 992311
### Instruction: Как объявить переменную amount со значением 992311 в Python? ### Response: amount = 992311
994,739
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 916099 в C#?
int speed = 916099;
### Instruction: Как объявить переменную speed со значением 916099 в C#? ### Response: int speed = 916099;
97,782,547
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1901; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1901; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
333,291
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4264.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4264));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4264. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4264));
91,613,480
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
43,958,610
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; }
15,014,336
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;
2,055,560
ru
C#
var_decl
beginner
Как объявить переменную score со значением 486703 в C#?
int score = 486703;
### Instruction: Как объявить переменную score со значением 486703 в C#? ### Response: int score = 486703;
72,981,580
en
Unity
string_ops
intermediate
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,492,347
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 67442 в Unity?
int amount = 67442;
### Instruction: Как объявить переменную amount со значением 67442 в Unity? ### Response: int amount = 67442;
95,838,624
en
Python
logic_ops
advanced
Write logic to check if the year 1907 is a leap year in Python.
def is_leap(): year = 1907 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1907 is a leap year in Python. ### Response: def is_leap(): year = 1907 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
51,624,133
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
89,000,235
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; }
112,983
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 7467.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7467));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 7467. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7467));
1,762,257
kk
C#
var_decl
beginner
C# тілінде 74315 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 74315;
### Instruction: C# тілінде 74315 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 74315;
4,534,025
en
Python
var_decl
beginner
How to declare a variable rate with value 678310 in Python?
rate = 678310
### Instruction: How to declare a variable rate with value 678310 in Python? ### Response: rate = 678310
45,028,199
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1982; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1982; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
38,059,961
kk
C#
string_ops
intermediate
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; }
17,250,832
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
94,765,419
en
C++
logic_ops
intermediate
Write a function that determines if the number 366 is prime in C++.
public bool IsPrime() { int n = 366; 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 366 is prime in C++. ### Response: public bool IsPrime() { int n = 366; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
897,361
kk
C#
var_decl
beginner
C# тілінде 485548 мәнімен count айнымалысын қалай жариялауға болады?
int count = 485548;
### Instruction: C# тілінде 485548 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 485548;
3,523,659
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 530435 в JavaScript?
let data = 530435;
### Instruction: Как объявить переменную data со значением 530435 в JavaScript? ### Response: let data = 530435;
60,674,949
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; }
71,362,293
kk
C++
logic_ops
intermediate
C++ тилінде 361 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 361; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 361 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 361; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
23,184,847
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1972 високосным.
public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1972 високосным. ### Response: public bool IsLeap() { int y = 1972; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,921,171
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 95435 в Unity?
int result = 95435;
### Instruction: Как объявить переменную result со значением 95435 в Unity? ### Response: int result = 95435;
33,863,819
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; }
31,242,741
en
C++
string_ops
advanced
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,098,543
kk
Unity
var_decl
beginner
Unity тілінде 353701 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 353701;
### Instruction: Unity тілінде 353701 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 353701;
67,565,748
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
416,706
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 9318.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9318))
### Instruction: Write a function in Python that sums numbers from 1 to 9318. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9318))
24,513,829
ru
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; }
85,637,895
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;
51,507,181
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]
71,794,617
en
C#
logic_ops
intermediate
Write a function that determines if the number 368 is prime in C#.
public bool IsPrime() { int n = 368; 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 368 is prime in C#. ### Response: public bool IsPrime() { int n = 368; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,379,152
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]