id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
12,354,365
kk
Java
logic_ops
intermediate
Java тилінде 52 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 52; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 52 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 52; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,179,275
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
91,945,419
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; }
2,314,318
en
Java
var_decl
beginner
How to declare a variable size with value 265747 in Java?
int size = 265747;
### Instruction: How to declare a variable size with value 265747 in Java? ### Response: int size = 265747;
3,493,659
en
C++
var_decl
beginner
How to declare a variable amount with value 511930 in C++?
int amount = 511930;
### Instruction: How to declare a variable amount with value 511930 in C++? ### Response: int amount = 511930;
11,645,850
kk
C#
logic_ops
advanced
C# тилінде 1945 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1945 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,538,187
kk
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); }
46,289,621
en
Unity
array_ops
intermediate
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); }
99,684,860
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1951 високосным.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1951 високосным. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
28,371,777
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 493 простым.
function isPrime() { let n = 493; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 493 простым. ### Response: function isPrime() { let n = 493; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,177,917
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 172709 в C++?
int amount = 172709;
### Instruction: Как объявить переменную amount со значением 172709 в C++? ### Response: int amount = 172709;
2,772,815
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 794247 в Unity?
int timer = 794247;
### Instruction: Как объявить переменную timer со значением 794247 в Unity? ### Response: int timer = 794247;
18,056,112
kk
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; }
2,207,512
ru
C#
var_decl
beginner
Как объявить переменную data со значением 13037 в C#?
int data = 13037;
### Instruction: Как объявить переменную data со значением 13037 в C#? ### Response: int data = 13037;
3,301,108
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 678420 в JavaScript?
let data = 678420;
### Instruction: Как объявить переменную data со значением 678420 в JavaScript? ### Response: let data = 678420;
56,483,085
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2020 високосным.
def is_leap(): year = 2020 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2020 високосным. ### Response: def is_leap(): year = 2020 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
405,462
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 7776.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7776));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 7776. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7776));
22,254,410
kk
Unity
logic_ops
intermediate
Unity тилінде 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: Unity тилінде 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; }
2,042,972
en
C#
var_decl
beginner
How to declare a variable limit with value 765950 in C#?
int limit = 765950;
### Instruction: How to declare a variable limit with value 765950 in C#? ### Response: int limit = 765950;
3,806,863
ru
Java
var_decl
beginner
Как объявить переменную level со значением 611351 в Java?
int level = 611351;
### Instruction: Как объявить переменную level со значением 611351 в Java? ### Response: int level = 611351;
144,395
kk
Java
sum_n
intermediate
Java тілінде 1-ден 3402-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3402));
### Instruction: Java тілінде 1-ден 3402-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3402));
4,815,857
ru
Java
var_decl
beginner
Как объявить переменную x со значением 616284 в Java?
int x = 616284;
### Instruction: Как объявить переменную x со значением 616284 в Java? ### Response: int x = 616284;
56,979,507
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1978 високосным.
function isLeap() { let y = 1978; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1978 високосным. ### Response: function isLeap() { let y = 1978; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
45,241,462
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
4,416,635
ru
C#
var_decl
beginner
Как объявить переменную limit со значением 644958 в C#?
int limit = 644958;
### Instruction: Как объявить переменную limit со значением 644958 в C#? ### Response: int limit = 644958;
48,792,236
en
C++
logic_ops
intermediate
Write logic to check if the year 2014 is a leap year in C++.
public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2014 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
505,083
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 7552.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7552));
### Instruction: Write a function in Java that sums numbers from 1 to 7552. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7552));
31,374,161
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; }
3,729,990
kk
C#
var_decl
beginner
C# тілінде 144776 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 144776;
### Instruction: C# тілінде 144776 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 144776;
2,473,538
kk
Java
var_decl
beginner
Java тілінде 619676 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 619676;
### Instruction: Java тілінде 619676 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 619676;
2,419,085
kk
Unity
var_decl
beginner
Unity тілінде 785094 мәнімен index айнымалысын қалай жариялауға болады?
int index = 785094;
### Instruction: Unity тілінде 785094 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 785094;
208,394
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 380.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(380) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 380. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(380) << std::endl;
96,565,365
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
63,038,056
en
Python
logic_ops
intermediate
Write logic to check if the year 2099 is a leap year in Python.
def is_leap(): year = 2099 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2099 is a leap year in Python. ### Response: def is_leap(): year = 2099 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
211,207
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 3540.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3540) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 3540. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3540) << std::endl;
243,109
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 7183-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7183));
### Instruction: JavaScript тілінде 1-ден 7183-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7183));
48,221,742
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 370 простым.
public bool IsPrime() { int n = 370; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 370 простым. ### Response: public bool IsPrime() { int n = 370; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,357,527
ru
Java
var_decl
beginner
Как объявить переменную size со значением 107259 в Java?
int size = 107259;
### Instruction: Как объявить переменную size со значением 107259 в Java? ### Response: int size = 107259;
41,299,356
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аеёиоуыэюя')
365,576
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 8056.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8056))
### Instruction: Write a function in Python that sums numbers from 1 to 8056. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8056))
790,386
kk
C#
var_decl
beginner
C# тілінде 624103 мәнімен level айнымалысын қалай жариялауға болады?
int level = 624103;
### Instruction: C# тілінде 624103 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 624103;
23,571,806
en
Java
logic_ops
advanced
Write logic to check if the year 2026 is a leap year in Java.
public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2026 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,623,911
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,670,021
kk
C#
var_decl
beginner
C# тілінде 338932 мәнімен count айнымалысын қалай жариялауға болады?
int count = 338932;
### Instruction: C# тілінде 338932 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 338932;
714,997
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 4917.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4917))
### Instruction: Write a function in Python that sums numbers from 1 to 4917. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4917))
28,412,682
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,833,016
kk
C#
var_decl
beginner
C# тілінде 528769 мәнімен y айнымалысын қалай жариялауға болады?
int y = 528769;
### Instruction: C# тілінде 528769 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 528769;
83,461,073
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
69,965,194
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2022 високосным.
public bool IsLeap() { int y = 2022; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2022 високосным. ### Response: public bool IsLeap() { int y = 2022; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,362,595
en
C#
var_decl
beginner
How to declare a variable size with value 721291 in C#?
int size = 721291;
### Instruction: How to declare a variable size with value 721291 in C#? ### Response: int size = 721291;
344,552
kk
C#
sum_n
intermediate
C# тілінде 1-ден 9859-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9859));
### Instruction: C# тілінде 1-ден 9859-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9859));
3,599,043
kk
Java
var_decl
beginner
Java тілінде 705480 мәнімен total айнымалысын қалай жариялауға болады?
int total = 705480;
### Instruction: Java тілінде 705480 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 705480;
50,093,002
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]
25,023,045
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
98,195,546
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
243,952
kk
JavaScript
factorial
advanced
JavaScript тілінде 5689 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5689));
### Instruction: JavaScript тілінде 5689 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5689));
14,308,449
en
C++
logic_ops
intermediate
Write logic to check if the year 1997 is a leap year in C++.
public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1997 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,576,854
ru
Java
var_decl
beginner
Как объявить переменную y со значением 565963 в Java?
int y = 565963;
### Instruction: Как объявить переменную y со значением 565963 в Java? ### Response: int y = 565963;
93,120,501
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;
2,417,914
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 656034 в JavaScript?
let limit = 656034;
### Instruction: Как объявить переменную limit со значением 656034 в JavaScript? ### Response: let limit = 656034;
84,946
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 9318.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9318));
### Instruction: Write a function in Java that sums numbers from 1 to 9318. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(9318));
96,126,275
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
61,291,908
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); }
3,466,166
ru
JavaScript
var_decl
beginner
Как объявить переменную result со значением 182988 в JavaScript?
let result = 182988;
### Instruction: Как объявить переменную result со значением 182988 в JavaScript? ### Response: let result = 182988;
37,006
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 3593.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3593))
### Instruction: Write a function in Python that calculates the factorial of 3593. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3593))
4,286,309
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 764435 в Unity?
int result = 764435;
### Instruction: Как объявить переменную result со значением 764435 в Unity? ### Response: int result = 764435;
99,576,519
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]
38,992,647
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 413 простым.
def is_prime(): n = 413 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 413 простым. ### Response: def is_prime(): n = 413 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,118
ru
Java
var_decl
beginner
Как объявить переменную size со значением 427742 в Java?
int size = 427742;
### Instruction: Как объявить переменную size со значением 427742 в Java? ### Response: int size = 427742;
3,709,022
en
C#
var_decl
beginner
How to declare a variable data with value 171342 in C#?
int data = 171342;
### Instruction: How to declare a variable data with value 171342 in C#? ### Response: int data = 171342;
2,070,488
kk
C++
var_decl
beginner
C++ тілінде 844911 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 844911;
### Instruction: C++ тілінде 844911 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 844911;
99,535,569
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; }
704,553
kk
Java
factorial
advanced
Java тілінде 8255 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8255));
### Instruction: Java тілінде 8255 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8255));
48,690,997
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
50,058
en
C#
func_def
intermediate
Write a function calculate in C# that takes weight and doubles it.
static int calculate(int weight) { return weight * 2; }
### Instruction: Write a function calculate in C# that takes weight and doubles it. ### Response: static int calculate(int weight) { return weight * 2; }
81,037,107
en
C++
logic_ops
advanced
Write a function that determines if the number 450 is prime in C++.
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: Write a function that determines if the number 450 is prime in C++. ### 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; }
51,421,601
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
1,664,540
en
C++
var_decl
beginner
How to declare a variable limit with value 767424 in C++?
int limit = 767424;
### Instruction: How to declare a variable limit with value 767424 in C++? ### Response: int limit = 767424;
31,965,918
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 42 простым.
public bool IsPrime() { int n = 42; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 42 простым. ### Response: public bool IsPrime() { int n = 42; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
418,743
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 570062 в JavaScript?
let index = 570062;
### Instruction: Как объявить переменную index со значением 570062 в JavaScript? ### Response: let index = 570062;
60,557,726
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
661,855
kk
Python
sum_n
intermediate
Python тілінде 1-ден 2154-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2154))
### Instruction: Python тілінде 1-ден 2154-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2154))
38,157,463
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; }
4,987,224
en
C++
var_decl
beginner
How to declare a variable x with value 555884 in C++?
int x = 555884;
### Instruction: How to declare a variable x with value 555884 in C++? ### Response: int x = 555884;
22,415,821
en
JavaScript
array_ops
advanced
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);
65,576,324
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; }
95,134,090
en
Unity
array_ops
intermediate
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; }
48,695,286
kk
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; }
2,129,557
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 686518 в JavaScript?
let x = 686518;
### Instruction: Как объявить переменную x со значением 686518 в JavaScript? ### Response: let x = 686518;
28,739,622
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); }
91,821,322
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
44,449,119
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; }
57,542,016
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
4,717,735
kk
JavaScript
var_decl
beginner
JavaScript тілінде 318853 мәнімен y айнымалысын қалай жариялауға болады?
let y = 318853;
### Instruction: JavaScript тілінде 318853 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 318853;
4,527,126
kk
Python
var_decl
beginner
Python тілінде 248907 мәнімен data айнымалысын қалай жариялауға болады?
data = 248907
### Instruction: Python тілінде 248907 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 248907
70,522,024
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
35,356,610
kk
Java
logic_ops
intermediate
Java тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
59,730,602
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 208 простым.
function isPrime() { let n = 208; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 208 простым. ### Response: function isPrime() { let n = 208; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
49,356,765
en
Python
string_ops
intermediate
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]
50,255,392
kk
Unity
array_ops
advanced
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; }