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
3,444,740
ru
C++
var_decl
beginner
Как объявить переменную index со значением 412490 в C++?
int index = 412490;
### Instruction: Как объявить переменную index со значением 412490 в C++? ### Response: int index = 412490;
98,792,580
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
72,034,693
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()
2,749,684
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 649678 in JavaScript?
let weight = 649678;
### Instruction: How to declare a variable weight with value 649678 in JavaScript? ### Response: let weight = 649678;
889,759
en
C#
var_decl
beginner
How to declare a variable timer with value 407281 in C#?
int timer = 407281;
### Instruction: How to declare a variable timer with value 407281 in C#? ### Response: int timer = 407281;
60,494,896
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1962 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1962; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1962 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1962; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
98,999,337
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1949 високосным.
def is_leap(): year = 1949 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1949 високосным. ### Response: def is_leap(): year = 1949 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
69,927,705
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; }
51,652,977
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
30,354,354
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; }
45,321,774
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; }
782,538
en
Java
var_decl
beginner
How to declare a variable index with value 580471 in Java?
int index = 580471;
### Instruction: How to declare a variable index with value 580471 in Java? ### Response: int index = 580471;
2,304,609
kk
Unity
var_decl
beginner
Unity тілінде 277060 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 277060;
### Instruction: Unity тілінде 277060 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 277060;
178,498
en
Python
var_decl
beginner
How to declare a variable weight with value 416674 in Python?
weight = 416674
### Instruction: How to declare a variable weight with value 416674 in Python? ### Response: weight = 416674
1,479,736
kk
Unity
var_decl
beginner
Unity тілінде 182641 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 182641;
### Instruction: Unity тілінде 182641 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 182641;
33,287,478
en
Unity
logic_ops
intermediate
Write logic to check if the year 1982 is a leap year in Unity.
public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1982 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
65,406,839
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 137 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 137; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 137 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 137; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,115,022
en
C#
var_decl
beginner
How to declare a variable count with value 885657 in C#?
int count = 885657;
### Instruction: How to declare a variable count with value 885657 in C#? ### Response: int count = 885657;
152,363
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 6019.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6019))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 6019. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6019))
1,182,829
kk
JavaScript
var_decl
beginner
JavaScript тілінде 892131 мәнімен level айнымалысын қалай жариялауға болады?
let level = 892131;
### Instruction: JavaScript тілінде 892131 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 892131;
72,078,550
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;
21,158,905
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); }
10,572,010
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
29,654,421
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);
86,069,276
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; }
42,324
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6165-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6165));
### Instruction: C# тілінде 1-ден 6165-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6165));
58,373,631
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; }
34,024,502
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(); }
70,562,424
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
49,210,581
en
C#
logic_ops
advanced
Write a function that determines if the number 21 is prime in C#.
public bool IsPrime() { int n = 21; 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 21 is prime in C#. ### Response: public bool IsPrime() { int n = 21; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
66,509,127
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 492 простым.
public bool IsPrime() { int n = 492; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 492 простым. ### Response: public bool IsPrime() { int n = 492; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
20,164,164
kk
C++
array_ops
advanced
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
51,786,323
kk
C#
logic_ops
advanced
C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,911,500
en
Unity
var_decl
beginner
How to declare a variable offset with value 151930 in Unity?
int offset = 151930;
### Instruction: How to declare a variable offset with value 151930 in Unity? ### Response: int offset = 151930;
3,269,466
ru
C#
var_decl
beginner
Как объявить переменную value со значением 344368 в C#?
int value = 344368;
### Instruction: Как объявить переменную value со значением 344368 в C#? ### Response: int value = 344368;
10,944,201
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; }
497,091
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 7209-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(7209) << std::endl;
### Instruction: C++ тілінде 1-ден 7209-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(7209) << std::endl;
25,362,249
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 450 простым.
public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 450 простым. ### Response: public bool IsPrime() { int n = 450; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
87,904
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4318-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4318));
### Instruction: C# тілінде 1-ден 4318-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4318));
72,598,868
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; }
3,650,332
en
Java
var_decl
beginner
How to declare a variable amount with value 599261 in Java?
int amount = 599261;
### Instruction: How to declare a variable amount with value 599261 in Java? ### Response: int amount = 599261;
3,649,280
en
C#
var_decl
beginner
How to declare a variable offset with value 235054 in C#?
int offset = 235054;
### Instruction: How to declare a variable offset with value 235054 in C#? ### Response: int offset = 235054;
4,055,487
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 525478 в Python?
weight = 525478
### Instruction: Как объявить переменную weight со значением 525478 в Python? ### Response: weight = 525478
54,230,155
ru
Unity
string_ops
advanced
Напишите на 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; }
96,420,830
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(); }
51,828,503
en
C#
logic_ops
intermediate
Write logic to check if the year 2092 is a leap year in C#.
public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2092 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
607,391
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 8036.
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(8036) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 8036. ### 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(8036) << std::endl;
18,839,811
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 477 простым.
function isPrime() { let n = 477; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 477 простым. ### Response: function isPrime() { let n = 477; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
62,252,793
kk
C++
logic_ops
advanced
C++ тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 205; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 205; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,086,156
kk
Unity
var_decl
beginner
Unity тілінде 72298 мәнімен y айнымалысын қалай жариялауға болады?
int y = 72298;
### Instruction: Unity тілінде 72298 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 72298;
83,079,615
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,866,984
ru
Java
var_decl
beginner
Как объявить переменную index со значением 192854 в Java?
int index = 192854;
### Instruction: Как объявить переменную index со значением 192854 в Java? ### Response: int index = 192854;
4,449,733
en
Python
var_decl
beginner
How to declare a variable index with value 199256 in Python?
index = 199256
### Instruction: How to declare a variable index with value 199256 in Python? ### Response: index = 199256
4,784,763
ru
C#
var_decl
beginner
Как объявить переменную total со значением 669949 в C#?
int total = 669949;
### Instruction: Как объявить переменную total со значением 669949 в C#? ### Response: int total = 669949;
38,844,900
kk
Unity
logic_ops
advanced
Unity тилінде 251 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 251; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 251 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 251; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,546,020
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,736,508
en
C#
var_decl
beginner
How to declare a variable limit with value 426030 in C#?
int limit = 426030;
### Instruction: How to declare a variable limit with value 426030 in C#? ### Response: int limit = 426030;
14,176,850
en
C#
logic_ops
advanced
Write a function that determines if the number 293 is prime in C#.
public bool IsPrime() { int n = 293; 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 293 is prime in C#. ### Response: public bool IsPrime() { int n = 293; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,792,085
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,052,096
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 882341 в JavaScript?
let offset = 882341;
### Instruction: Как объявить переменную offset со значением 882341 в JavaScript? ### Response: let offset = 882341;
2,151,172
kk
C#
var_decl
beginner
C# тілінде 308978 мәнімен data айнымалысын қалай жариялауға болады?
int data = 308978;
### Instruction: C# тілінде 308978 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 308978;
72,597,153
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; }
90,346,108
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,056,676
ru
Python
var_decl
beginner
Как объявить переменную data со значением 267063 в Python?
data = 267063
### Instruction: Как объявить переменную data со значением 267063 в Python? ### Response: data = 267063
378,708
ru
Java
var_decl
beginner
Как объявить переменную index со значением 897900 в Java?
int index = 897900;
### Instruction: Как объявить переменную index со значением 897900 в Java? ### Response: int index = 897900;
305,017
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 7646.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7646));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 7646. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7646));
99,580,557
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
52,288,107
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
19,081,462
kk
C++
logic_ops
intermediate
C++ тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
91,804,642
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
15,048,012
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; }
49,942,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(); }
1,356,583
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 530780 в Unity?
int value = 530780;
### Instruction: Как объявить переменную value со значением 530780 в Unity? ### Response: int value = 530780;
29,822,469
en
Python
logic_ops
intermediate
Write a function that determines if the number 337 is prime in Python.
def is_prime(): n = 337 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 337 is prime in Python. ### Response: def is_prime(): n = 337 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
15,291,328
kk
Java
array_ops
advanced
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; }
50,241
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 3968.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3968))
### Instruction: Write a function in Python that calculates the factorial of 3968. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3968))
2,422,151
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 64346 в Python?
buffer = 64346
### Instruction: Как объявить переменную buffer со значением 64346 в Python? ### Response: buffer = 64346
31,638,815
kk
Python
string_ops
intermediate
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
186,800
en
JavaScript
var_decl
beginner
How to declare a variable score with value 235135 in JavaScript?
let score = 235135;
### Instruction: How to declare a variable score with value 235135 in JavaScript? ### Response: let score = 235135;
27,157,009
en
JavaScript
string_ops
intermediate
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
57,176,049
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
67,991,416
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2005 високосным.
public bool IsLeap() { int y = 2005; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2005 високосным. ### Response: public bool IsLeap() { int y = 2005; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
77,978,616
ru
Unity
string_ops
advanced
Напишите на 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; }
78,553,123
en
Unity
string_ops
advanced
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; }
42,836,728
kk
Python
array_ops
advanced
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
2,695,642
en
Java
var_decl
beginner
How to declare a variable rate with value 385286 in Java?
int rate = 385286;
### Instruction: How to declare a variable rate with value 385286 in Java? ### Response: int rate = 385286;
4,449,837
kk
C#
var_decl
beginner
C# тілінде 167985 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 167985;
### Instruction: C# тілінде 167985 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 167985;
118,487
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 4912.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4912));
### Instruction: Write a function in C# that calculates the factorial of 4912. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4912));
53,277,655
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; }
25,261,497
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
1,762,133
en
Java
var_decl
beginner
How to declare a variable amount with value 551820 in Java?
int amount = 551820;
### Instruction: How to declare a variable amount with value 551820 in Java? ### Response: int amount = 551820;
546,006
kk
C#
factorial
advanced
C# тілінде 5160 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5160));
### Instruction: C# тілінде 5160 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5160));
1,157,593
kk
JavaScript
var_decl
beginner
JavaScript тілінде 61753 мәнімен health айнымалысын қалай жариялауға болады?
let health = 61753;
### Instruction: JavaScript тілінде 61753 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 61753;
66,212,078
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1995 високосным.
public bool IsLeap() { int y = 1995; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1995 високосным. ### Response: public bool IsLeap() { int y = 1995; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,289,801
en
C#
var_decl
beginner
How to declare a variable weight with value 122586 in C#?
int weight = 122586;
### Instruction: How to declare a variable weight with value 122586 in C#? ### Response: int weight = 122586;
217,038
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 5435.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5435));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 5435. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5435));
67,667,976
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; }
51,366,757
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
194,201
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 5307.
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(5307) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 5307. ### 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(5307) << std::endl;
97,264,354
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; }