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,943,114
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 44440 в Unity?
int value = 44440;
### Instruction: Как объявить переменную value со значением 44440 в Unity? ### Response: int value = 44440;
29,116,414
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,822,760
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 299495 в C#?
int timer = 299495;
### Instruction: Как объявить переменную timer со значением 299495 в C#? ### Response: int timer = 299495;
51,349,671
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2019 високосным.
function isLeap() { let y = 2019; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2019 високосным. ### Response: function isLeap() { let y = 2019; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
98,923,730
kk
Java
string_ops
advanced
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
58,098,332
kk
Unity
logic_ops
advanced
Unity тилінде 228 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 228; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 228 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 228; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,459,214
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()
70,059,538
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,852,669
ru
Java
var_decl
beginner
Как объявить переменную value со значением 538751 в Java?
int value = 538751;
### Instruction: Как объявить переменную value со значением 538751 в Java? ### Response: int value = 538751;
263,528
ru
Java
var_decl
beginner
Как объявить переменную total со значением 645841 в Java?
int total = 645841;
### Instruction: Как объявить переменную total со значением 645841 в Java? ### Response: int total = 645841;
16,135,572
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 256 простым.
public bool IsPrime() { int n = 256; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 256 простым. ### Response: public bool IsPrime() { int n = 256; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
81,246,736
en
Java
logic_ops
intermediate
Write a function that determines if the number 435 is prime in Java.
public bool IsPrime() { int n = 435; 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 435 is prime in Java. ### Response: public bool IsPrime() { int n = 435; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
86,872,044
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2061 високосным.
function isLeap() { let y = 2061; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2061 високосным. ### Response: function isLeap() { let y = 2061; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,579,050
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 445567 в Unity?
int amount = 445567;
### Instruction: Как объявить переменную amount со значением 445567 в Unity? ### Response: int amount = 445567;
99,394,291
kk
Java
logic_ops
advanced
Java тилінде 132 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 132; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 132 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 132; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
64,842,863
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);
4,626,488
ru
C#
var_decl
beginner
Как объявить переменную data со значением 536793 в C#?
int data = 536793;
### Instruction: Как объявить переменную data со значением 536793 в C#? ### Response: int data = 536793;
10,935,375
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
2,386,158
ru
Java
var_decl
beginner
Как объявить переменную value со значением 295854 в Java?
int value = 295854;
### Instruction: Как объявить переменную value со значением 295854 в Java? ### Response: int value = 295854;
96,391,283
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
3,915,355
kk
Java
var_decl
beginner
Java тілінде 157959 мәнімен count айнымалысын қалай жариялауға болады?
int count = 157959;
### Instruction: Java тілінде 157959 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 157959;
655,854
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 3371.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3371)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 3371. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3371)); }
1,756,351
ru
Python
var_decl
beginner
Как объявить переменную count со значением 769768 в Python?
count = 769768
### Instruction: Как объявить переменную count со значением 769768 в Python? ### Response: count = 769768
33,192,171
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; }
2,285,905
kk
C#
var_decl
beginner
C# тілінде 134397 мәнімен total айнымалысын қалай жариялауға болады?
int total = 134397;
### Instruction: C# тілінде 134397 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 134397;
18,141,638
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,735,354
ru
Java
var_decl
beginner
Как объявить переменную total со значением 106772 в Java?
int total = 106772;
### Instruction: Как объявить переменную total со значением 106772 в Java? ### Response: int total = 106772;
4,009,629
ru
Python
var_decl
beginner
Как объявить переменную amount со значением 543558 в Python?
amount = 543558
### Instruction: Как объявить переменную amount со значением 543558 в Python? ### Response: amount = 543558
283,738
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 5146.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5146) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 5146. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5146) << std::endl;
2,945,097
kk
Unity
var_decl
beginner
Unity тілінде 479265 мәнімен total айнымалысын қалай жариялауға болады?
int total = 479265;
### Instruction: Unity тілінде 479265 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 479265;
72,054,706
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
3,393,571
en
Python
var_decl
beginner
How to declare a variable timer with value 115243 in Python?
timer = 115243
### Instruction: How to declare a variable timer with value 115243 in Python? ### Response: timer = 115243
1,684,636
ru
Python
var_decl
beginner
Как объявить переменную count со значением 168230 в Python?
count = 168230
### Instruction: Как объявить переменную count со значением 168230 в Python? ### Response: count = 168230
26,205,304
kk
Java
logic_ops
advanced
Java тилінде 113 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 113 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
98,039,787
en
Python
array_ops
advanced
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]
53,511,723
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
91,132,907
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); }
98,689,401
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,892,258
en
C#
var_decl
beginner
How to declare a variable index with value 893220 in C#?
int index = 893220;
### Instruction: How to declare a variable index with value 893220 in C#? ### Response: int index = 893220;
89,720,122
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
70,912,616
kk
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; }
941,633
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 918630 в Unity?
int x = 918630;
### Instruction: Как объявить переменную x со значением 918630 в Unity? ### Response: int x = 918630;
49,151,539
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
155,825
kk
Java
var_decl
beginner
Java тілінде 253665 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 253665;
### Instruction: Java тілінде 253665 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 253665;
64,024,132
ru
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; }
17,474,687
en
C++
logic_ops
advanced
Write a function that determines if the number 278 is prime in C++.
public bool IsPrime() { int n = 278; 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 278 is prime in C++. ### Response: public bool IsPrime() { int n = 278; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,630,310
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; }
34,708,996
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 137 простым.
def is_prime(): n = 137 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 137 простым. ### Response: def is_prime(): n = 137 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
13,972,833
kk
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);
17,064,645
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]
88,305,610
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
1,624,766
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 150704 in JavaScript?
let rate = 150704;
### Instruction: How to declare a variable rate with value 150704 in JavaScript? ### Response: let rate = 150704;
3,176,196
en
Unity
var_decl
beginner
How to declare a variable timer with value 192987 in Unity?
int timer = 192987;
### Instruction: How to declare a variable timer with value 192987 in Unity? ### Response: int timer = 192987;
65,153,093
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 4 простым.
public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 4 простым. ### Response: public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,423,722
kk
C#
var_decl
beginner
C# тілінде 106309 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 106309;
### Instruction: C# тілінде 106309 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 106309;
49,615,028
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,240,612
kk
C#
var_decl
beginner
C# тілінде 541412 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 541412;
### Instruction: C# тілінде 541412 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 541412;
66,618,649
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
54,025,337
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
2,594,862
kk
Unity
var_decl
beginner
Unity тілінде 233212 мәнімен score айнымалысын қалай жариялауға болады?
int score = 233212;
### Instruction: Unity тілінде 233212 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 233212;
10,042,469
en
C#
string_ops
advanced
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,196,338
kk
Java
var_decl
beginner
Java тілінде 908836 мәнімен result айнымалысын қалай жариялауға болады?
int result = 908836;
### Instruction: Java тілінде 908836 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 908836;
4,141,099
kk
JavaScript
var_decl
beginner
JavaScript тілінде 758876 мәнімен index айнымалысын қалай жариялауға болады?
let index = 758876;
### Instruction: JavaScript тілінде 758876 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 758876;
483,778
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4882.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4882));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4882. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4882));
162,307
kk
Unity
var_decl
beginner
Unity тілінде 812802 мәнімен count айнымалысын қалай жариялауға болады?
int count = 812802;
### Instruction: Unity тілінде 812802 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 812802;
3,619,078
kk
Java
var_decl
beginner
Java тілінде 317601 мәнімен size айнымалысын қалай жариялауға болады?
int size = 317601;
### Instruction: Java тілінде 317601 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 317601;
35,885,726
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
75,334
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 2044.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2044));
### Instruction: Write a function in Java that calculates the factorial of 2044. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2044));
96,072,315
kk
Unity
logic_ops
advanced
Unity тилінде 73 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 73; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 73 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 73; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
271,171
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 8972.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8972));
### Instruction: Write a function in Java that sums numbers from 1 to 8972. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8972));
48,223,088
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,866,064
ru
Python
var_decl
beginner
Как объявить переменную data со значением 653 в Python?
data = 653
### Instruction: Как объявить переменную data со значением 653 в Python? ### Response: data = 653
19,802,605
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 401 простым.
def is_prime(): n = 401 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 401 простым. ### Response: def is_prime(): n = 401 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,596,664
en
C++
var_decl
beginner
How to declare a variable rate with value 496591 in C++?
int rate = 496591;
### Instruction: How to declare a variable rate with value 496591 in C++? ### Response: int rate = 496591;
95,322,795
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2097 is a leap year in JavaScript.
function isLeap() { let y = 2097; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2097 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2097; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
133,618
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 8865.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8865) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 8865. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8865) << std::endl;
89,617,375
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,423,555
ru
Python
var_decl
beginner
Как объявить переменную data со значением 719142 в Python?
data = 719142
### Instruction: Как объявить переменную data со значением 719142 в Python? ### Response: data = 719142
3,485,421
ru
Java
var_decl
beginner
Как объявить переменную buffer со значением 850112 в Java?
int buffer = 850112;
### Instruction: Как объявить переменную buffer со значением 850112 в Java? ### Response: int buffer = 850112;
3,729,737
en
C#
var_decl
beginner
How to declare a variable total with value 433400 in C#?
int total = 433400;
### Instruction: How to declare a variable total with value 433400 in C#? ### Response: int total = 433400;
44,190,800
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; }
3,488,853
en
C++
var_decl
beginner
How to declare a variable timer with value 76235 in C++?
int timer = 76235;
### Instruction: How to declare a variable timer with value 76235 in C++? ### Response: int timer = 76235;
57,056,868
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; }
2,142,871
ru
Python
var_decl
beginner
Как объявить переменную index со значением 62351 в Python?
index = 62351
### Instruction: Как объявить переменную index со значением 62351 в Python? ### Response: index = 62351
1,981,918
kk
C#
var_decl
beginner
C# тілінде 909425 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 909425;
### Instruction: C# тілінде 909425 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 909425;
86,290,609
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2004 is a leap year in JavaScript.
function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2004 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
92,814,224
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
47,243,502
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2021 високосным.
public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2021 високосным. ### Response: public bool IsLeap() { int y = 2021; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,755,317
en
C#
var_decl
beginner
How to declare a variable health with value 483102 in C#?
int health = 483102;
### Instruction: How to declare a variable health with value 483102 in C#? ### Response: int health = 483102;
93,054,006
kk
Unity
logic_ops
advanced
Unity тилінде 322 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 322; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 322 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 322; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
574,486
kk
Python
var_decl
beginner
Python тілінде 543392 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 543392
### Instruction: Python тілінде 543392 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 543392
227,759
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 9892.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9892))
### Instruction: Write a function in Python that sums numbers from 1 to 9892. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9892))
13,810,945
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; }
2,963,552
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 816598 в Python?
limit = 816598
### Instruction: Как объявить переменную limit со значением 816598 в Python? ### Response: limit = 816598
23,310,995
en
Python
string_ops
intermediate
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()
4,869,678
ru
Java
var_decl
beginner
Как объявить переменную count со значением 179180 в Java?
int count = 179180;
### Instruction: Как объявить переменную count со значением 179180 в Java? ### Response: int count = 179180;
70,417,076
kk
C++
logic_ops
advanced
C++ тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 97; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 97; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
50,699,147
kk
C#
logic_ops
intermediate
C# тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1902 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
65,754,270
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2029 високосным.
public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2029 високосным. ### Response: public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
903,134
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 1112.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1112));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 1112. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1112));