id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
81,054,114
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 482 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 482; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 482 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 482; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
58,214,099
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); }
19,653,490
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 334 простым.
def is_prime(): n = 334 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 334 простым. ### Response: def is_prime(): n = 334 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
659,255
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 6328.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6328));
### Instruction: Write a function in Java that sums numbers from 1 to 6328. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6328));
2,806,163
en
Unity
var_decl
beginner
How to declare a variable count with value 319393 in Unity?
int count = 319393;
### Instruction: How to declare a variable count with value 319393 in Unity? ### Response: int count = 319393;
283,131
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 4697.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4697))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 4697. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4697))
27,063,190
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2063 високосным.
public bool IsLeap() { int y = 2063; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2063 високосным. ### Response: public bool IsLeap() { int y = 2063; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
83,333,795
kk
Python
logic_ops
intermediate
Python тилінде 360 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 360 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 360 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 360 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
96,142,370
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; }
52,268,529
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; }
23,037,945
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 362 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 362; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 362 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 362; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,248,274
kk
JavaScript
var_decl
beginner
JavaScript тілінде 780779 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 780779;
### Instruction: JavaScript тілінде 780779 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 780779;
1,245,729
kk
Python
var_decl
beginner
Python тілінде 183786 мәнімен data айнымалысын қалай жариялауға болады?
data = 183786
### Instruction: Python тілінде 183786 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 183786
38,288,924
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; }
3,747,684
en
C#
var_decl
beginner
How to declare a variable rate with value 616318 in C#?
int rate = 616318;
### Instruction: How to declare a variable rate with value 616318 in C#? ### Response: int rate = 616318;
3,349,074
kk
JavaScript
var_decl
beginner
JavaScript тілінде 110367 мәнімен data айнымалысын қалай жариялауға болады?
let data = 110367;
### Instruction: JavaScript тілінде 110367 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 110367;
925,611
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 340.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(340) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 340. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(340) << std::endl;
10,698,800
kk
Java
array_ops
intermediate
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,739,879
kk
Java
var_decl
beginner
Java тілінде 170224 мәнімен size айнымалысын қалай жариялауға болады?
int size = 170224;
### Instruction: Java тілінде 170224 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 170224;
1,569,605
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 679237 в Unity?
int y = 679237;
### Instruction: Как объявить переменную y со значением 679237 в Unity? ### Response: int y = 679237;
56,666,405
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
93,626,742
en
C++
array_ops
intermediate
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
50,855,433
kk
Java
logic_ops
intermediate
Java тилінде 136 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 136; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 136 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 136; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,462,192
en
C#
var_decl
beginner
How to declare a variable amount with value 201261 in C#?
int amount = 201261;
### Instruction: How to declare a variable amount with value 201261 in C#? ### Response: int amount = 201261;
22,593,140
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1981 високосным.
public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1981 високосным. ### Response: public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
29,458,212
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,122,918
ru
Python
var_decl
beginner
Как объявить переменную index со значением 544047 в Python?
index = 544047
### Instruction: Как объявить переменную index со значением 544047 в Python? ### Response: index = 544047
30,389,472
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; }
49,850,379
kk
C#
logic_ops
intermediate
C# тилінде 1912 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1912 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
157,419
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 3695.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3695));
### Instruction: Write a function in C# that sums numbers from 1 to 3695. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3695));
3,688,041
kk
C#
var_decl
beginner
C# тілінде 538888 мәнімен data айнымалысын қалай жариялауға болады?
int data = 538888;
### Instruction: C# тілінде 538888 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 538888;
60,024,244
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,529,348
en
Java
var_decl
beginner
How to declare a variable size with value 340139 in Java?
int size = 340139;
### Instruction: How to declare a variable size with value 340139 in Java? ### Response: int size = 340139;
4,061,183
kk
JavaScript
var_decl
beginner
JavaScript тілінде 157663 мәнімен level айнымалысын қалай жариялауға болады?
let level = 157663;
### Instruction: JavaScript тілінде 157663 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 157663;
3,038,073
kk
Python
var_decl
beginner
Python тілінде 703709 мәнімен amount айнымалысын қалай жариялауға болады?
amount = 703709
### Instruction: Python тілінде 703709 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: amount = 703709
2,673,689
kk
C++
var_decl
beginner
C++ тілінде 773951 мәнімен index айнымалысын қалай жариялауға болады?
int index = 773951;
### Instruction: C++ тілінде 773951 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 773951;
99,863,483
ru
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); }
39,214,131
kk
Unity
logic_ops
advanced
Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
93,417,587
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2082 is a leap year in JavaScript.
function isLeap() { let y = 2082; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2082 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2082; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,441,040
ru
Unity
var_decl
beginner
Как объявить переменную offset со значением 301216 в Unity?
int offset = 301216;
### Instruction: Как объявить переменную offset со значением 301216 в Unity? ### Response: int offset = 301216;
49,671,227
kk
C#
logic_ops
advanced
C# тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
24,301,918
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; }
386,017
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 7256.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7256));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 7256. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7256));
82,411,065
kk
Python
logic_ops
advanced
Python тилінде 135 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 135 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 135 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 135 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
19,655,616
ru
Unity
array_ops
intermediate
Напишите на 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; }
84,846,055
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
24,287,046
en
Java
logic_ops
advanced
Write logic to check if the year 2011 is a leap year in Java.
public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2011 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2011; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,358,446
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 664511 в Unity?
int count = 664511;
### Instruction: Как объявить переменную count со значением 664511 в Unity? ### Response: int count = 664511;
78,597,024
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); }
4,877,885
ru
Java
var_decl
beginner
Как объявить переменную limit со значением 939384 в Java?
int limit = 939384;
### Instruction: Как объявить переменную limit со значением 939384 в Java? ### Response: int limit = 939384;
12,721,334
kk
Java
array_ops
advanced
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
62,253
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2503.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2503));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2503. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2503));
281,856
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 8205.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8205));
### Instruction: Write a function in Java that calculates the factorial of 8205. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8205));
2,821,749
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 238377 in JavaScript?
let timer = 238377;
### Instruction: How to declare a variable timer with value 238377 in JavaScript? ### Response: let timer = 238377;
3,204,959
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 303752 в Unity?
int rate = 303752;
### Instruction: Как объявить переменную rate со значением 303752 в Unity? ### Response: int rate = 303752;
74,110,356
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 461 простым.
function isPrime() { let n = 461; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 461 простым. ### Response: function isPrime() { let n = 461; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,143,876
kk
Unity
var_decl
beginner
Unity тілінде 969804 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 969804;
### Instruction: Unity тілінде 969804 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 969804;
1,844,950
ru
Python
var_decl
beginner
Как объявить переменную health со значением 783971 в Python?
health = 783971
### Instruction: Как объявить переменную health со значением 783971 в Python? ### Response: health = 783971
77,189,510
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(); }
51,284,126
en
Python
array_ops
advanced
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]
87,655,444
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); }
2,332,591
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 457489 в Java?
int timer = 457489;
### Instruction: Как объявить переменную timer со значением 457489 в Java? ### Response: int timer = 457489;
87,888,562
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 130 простым.
function isPrime() { let n = 130; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 130 простым. ### Response: function isPrime() { let n = 130; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
361,442
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 5593.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5593)); }
### Instruction: Write a function in Unity that calculates the factorial of 5593. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5593)); }
1,691,428
kk
Unity
var_decl
beginner
Unity тілінде 598728 мәнімен level айнымалысын қалай жариялауға болады?
int level = 598728;
### Instruction: Unity тілінде 598728 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 598728;
60,719,365
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 329 простым.
public bool IsPrime() { int n = 329; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 329 простым. ### Response: public bool IsPrime() { int n = 329; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
646,735
kk
C#
factorial
advanced
C# тілінде 1148 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1148));
### Instruction: C# тілінде 1148 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1148));
99,229,599
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; }
1,016,925
kk
C++
var_decl
beginner
C++ тілінде 943892 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 943892;
### Instruction: C++ тілінде 943892 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 943892;
2,802,894
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 221407 в JavaScript?
let offset = 221407;
### Instruction: Как объявить переменную offset со значением 221407 в JavaScript? ### Response: let offset = 221407;
10,739,887
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 297 простым.
function isPrime() { let n = 297; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 297 простым. ### Response: function isPrime() { let n = 297; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
22,522,099
en
Python
logic_ops
advanced
Write logic to check if the year 1937 is a leap year in Python.
def is_leap(): year = 1937 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1937 is a leap year in Python. ### Response: def is_leap(): year = 1937 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,841,074
kk
C#
var_decl
beginner
C# тілінде 762692 мәнімен size айнымалысын қалай жариялауға болады?
int size = 762692;
### Instruction: C# тілінде 762692 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 762692;
1,077,227
en
C++
var_decl
beginner
How to declare a variable weight with value 749403 in C++?
int weight = 749403;
### Instruction: How to declare a variable weight with value 749403 in C++? ### Response: int weight = 749403;
80,362,080
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('');
74,595,410
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; }
1,061,532
ru
C++
var_decl
beginner
Как объявить переменную value со значением 57461 в C++?
int value = 57461;
### Instruction: Как объявить переменную value со значением 57461 в C++? ### Response: int value = 57461;
96,032,535
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);
70,742,787
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; }
31,746,902
kk
Unity
logic_ops
intermediate
Unity тилінде 249 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 249; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 249 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 249; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,206,318
kk
C++
var_decl
beginner
C++ тілінде 644409 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 644409;
### Instruction: C++ тілінде 644409 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 644409;
65,567,832
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
3,492,901
ru
Python
var_decl
beginner
Как объявить переменную x со значением 483532 в Python?
x = 483532
### Instruction: Как объявить переменную x со значением 483532 в Python? ### Response: x = 483532
49,058,659
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
15,916,986
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
88,303,914
ru
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]
64,064,462
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2075 високосным.
def is_leap(): year = 2075 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2075 високосным. ### Response: def is_leap(): year = 2075 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
67,310
kk
C#
factorial
advanced
C# тілінде 324 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(324));
### Instruction: C# тілінде 324 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(324));
2,373,352
kk
C#
var_decl
beginner
C# тілінде 642305 мәнімен health айнымалысын қалай жариялауға болады?
int health = 642305;
### Instruction: C# тілінде 642305 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 642305;
4,118,789
en
C++
var_decl
beginner
How to declare a variable amount with value 894407 in C++?
int amount = 894407;
### Instruction: How to declare a variable amount with value 894407 in C++? ### Response: int amount = 894407;
60,353,359
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; }
65,315,807
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
89,086,818
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; }
162,377
en
C#
var_decl
beginner
How to declare a variable total with value 751906 in C#?
int total = 751906;
### Instruction: How to declare a variable total with value 751906 in C#? ### Response: int total = 751906;
17,727,430
kk
Python
logic_ops
intermediate
Python тилінде 2083 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2083 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2083 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2083 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
97,978,100
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2000 is a leap year in JavaScript.
function isLeap() { let y = 2000; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2000 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2000; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,497,193
en
C#
var_decl
beginner
How to declare a variable count with value 724412 in C#?
int count = 724412;
### Instruction: How to declare a variable count with value 724412 in C#? ### Response: int count = 724412;
57,049,211
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(); }
18,277,791
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
83,854,285
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; }