id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
268,481
kk
Java
sum_n
intermediate
Java тілінде 1-ден 8242-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8242));
### Instruction: Java тілінде 1-ден 8242-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8242));
26,439,661
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
2,363,698
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 896666 в Java?
int speed = 896666;
### Instruction: Как объявить переменную speed со значением 896666 в Java? ### Response: int speed = 896666;
97,954,246
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
78,228,065
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
606,765
kk
JavaScript
factorial
advanced
JavaScript тілінде 4254 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4254));
### Instruction: JavaScript тілінде 4254 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4254));
80,493,749
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;
35,803,081
en
C++
string_ops
intermediate
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
21,408,094
en
C++
logic_ops
advanced
Write logic to check if the year 1922 is a leap year in C++.
public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1922 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,993,328
kk
C++
var_decl
beginner
C++ тілінде 397567 мәнімен score айнымалысын қалай жариялауға болады?
int score = 397567;
### Instruction: C++ тілінде 397567 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 397567;
29,506,950
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; }
52,435,945
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); }
806,292
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 217.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(217))
### Instruction: Write a function in Python that sums numbers from 1 to 217. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(217))
4,148,869
ru
Python
var_decl
beginner
Как объявить переменную score со значением 29218 в Python?
score = 29218
### Instruction: Как объявить переменную score со значением 29218 в Python? ### Response: score = 29218
4,859,357
ru
Java
var_decl
beginner
Как объявить переменную x со значением 644069 в Java?
int x = 644069;
### Instruction: Как объявить переменную x со значением 644069 в Java? ### Response: int x = 644069;
29,961,651
kk
Java
logic_ops
advanced
Java тилінде 43 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 43; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 43 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 43; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,445,243
en
C#
var_decl
beginner
How to declare a variable size with value 936162 in C#?
int size = 936162;
### Instruction: How to declare a variable size with value 936162 in C#? ### Response: int size = 936162;
81,022,746
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; }
47,245,366
en
Java
logic_ops
intermediate
Write logic to check if the year 2027 is a leap year in Java.
public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2027 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
91,037,370
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,215,918
en
Python
var_decl
beginner
How to declare a variable amount with value 678986 in Python?
amount = 678986
### Instruction: How to declare a variable amount with value 678986 in Python? ### Response: amount = 678986
784,600
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 8788.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8788) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 8788. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8788) << std::endl;
88,070,716
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; }
81,466,626
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
28,846,525
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(); }
4,419,397
en
C#
var_decl
beginner
How to declare a variable level with value 806277 in C#?
int level = 806277;
### Instruction: How to declare a variable level with value 806277 in C#? ### Response: int level = 806277;
30,762,377
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
3,112,978
en
Unity
var_decl
beginner
How to declare a variable size with value 610066 in Unity?
int size = 610066;
### Instruction: How to declare a variable size with value 610066 in Unity? ### Response: int size = 610066;
1,099,933
ru
C#
var_decl
beginner
Как объявить переменную size со значением 306531 в C#?
int size = 306531;
### Instruction: Как объявить переменную size со значением 306531 в C#? ### Response: int size = 306531;
2,619,549
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 114791 в Java?
int timer = 114791;
### Instruction: Как объявить переменную timer со значением 114791 в Java? ### Response: int timer = 114791;
10,274,174
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
36,379,757
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; }
38,090,341
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); }
2,402,018
kk
Python
var_decl
beginner
Python тілінде 412600 мәнімен index айнымалысын қалай жариялауға болады?
index = 412600
### Instruction: Python тілінде 412600 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 412600
2,003,345
ru
C#
var_decl
beginner
Как объявить переменную level со значением 23743 в C#?
int level = 23743;
### Instruction: Как объявить переменную level со значением 23743 в C#? ### Response: int level = 23743;
18,335,028
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; }
4,696,386
kk
Java
var_decl
beginner
Java тілінде 606651 мәнімен count айнымалысын қалай жариялауға болады?
int count = 606651;
### Instruction: Java тілінде 606651 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 606651;
68,469,940
en
Unity
logic_ops
advanced
Write logic to check if the year 2068 is a leap year in Unity.
public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2068 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,294,848
en
Unity
var_decl
beginner
How to declare a variable level with value 391666 in Unity?
int level = 391666;
### Instruction: How to declare a variable level with value 391666 in Unity? ### Response: int level = 391666;
91,367,015
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 152 простым.
public bool IsPrime() { int n = 152; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 152 простым. ### Response: public bool IsPrime() { int n = 152; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
19,327,684
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
61,221,410
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 331 простым.
def is_prime(): n = 331 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 331 простым. ### Response: def is_prime(): n = 331 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,580,164
en
Java
var_decl
beginner
How to declare a variable buffer with value 369321 in Java?
int buffer = 369321;
### Instruction: How to declare a variable buffer with value 369321 in Java? ### Response: int buffer = 369321;
4,984,111
en
Java
var_decl
beginner
How to declare a variable offset with value 357352 in Java?
int offset = 357352;
### Instruction: How to declare a variable offset with value 357352 in Java? ### Response: int offset = 357352;
24,128
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 4661.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4661)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 4661. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4661)); }
99,529,488
kk
C#
logic_ops
advanced
C# тилінде 162 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 162; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 162 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 162; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
45,989,217
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
2,151,783
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 654743 в Unity?
int timer = 654743;
### Instruction: Как объявить переменную timer со значением 654743 в Unity? ### Response: int timer = 654743;
2,958,800
kk
Unity
var_decl
beginner
Unity тілінде 103446 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 103446;
### Instruction: Unity тілінде 103446 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 103446;
4,427,589
kk
Unity
var_decl
beginner
Unity тілінде 870470 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 870470;
### Instruction: Unity тілінде 870470 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 870470;
2,042,213
en
Java
var_decl
beginner
How to declare a variable size with value 672999 in Java?
int size = 672999;
### Instruction: How to declare a variable size with value 672999 in Java? ### Response: int size = 672999;
19,401,863
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 487 простым.
public bool IsPrime() { int n = 487; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 487 простым. ### Response: public bool IsPrime() { int n = 487; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
98,266,166
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; }
16,806,160
kk
Python
logic_ops
advanced
Python тилінде 371 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 371 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 371 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 371 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
48,826,816
kk
Unity
logic_ops
advanced
Unity тилінде 1952 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1952; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1952 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1952; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
18,628,155
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; }
48,087,766
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2084 високосным.
function isLeap() { let y = 2084; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2084 високосным. ### Response: function isLeap() { let y = 2084; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
57,681,907
en
C#
array_ops
advanced
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); }
83,390,552
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
73,692,518
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; }
65,567,266
en
JavaScript
string_ops
advanced
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('');
97,321,228
kk
C++
logic_ops
intermediate
C++ тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2017; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,691,770
en
C#
var_decl
beginner
How to declare a variable speed with value 941213 in C#?
int speed = 941213;
### Instruction: How to declare a variable speed with value 941213 in C#? ### Response: int speed = 941213;
3,428,145
kk
C++
var_decl
beginner
C++ тілінде 814296 мәнімен level айнымалысын қалай жариялауға болады?
int level = 814296;
### Instruction: C++ тілінде 814296 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 814296;
146,313
kk
JavaScript
factorial
advanced
JavaScript тілінде 6219 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6219));
### Instruction: JavaScript тілінде 6219 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6219));
318,357
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 6817.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6817)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 6817. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6817)); }
60,441,593
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; }
30,121,912
en
JavaScript
string_ops
advanced
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('');
70,070,374
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
79,830,584
en
C#
string_ops
intermediate
Write a function that checks if a string is a palindrome in C#.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C#. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
19,135,017
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]
19,034,414
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
42,074,642
en
Java
logic_ops
advanced
Write logic to check if the year 2016 is a leap year in Java.
public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2016 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
446,902
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 5049.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5049) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 5049. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5049) << std::endl;
23,875,122
kk
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); }
4,981,192
ru
C++
var_decl
beginner
Как объявить переменную x со значением 599243 в C++?
int x = 599243;
### Instruction: Как объявить переменную x со значением 599243 в C++? ### Response: int x = 599243;
1,155,601
kk
JavaScript
var_decl
beginner
JavaScript тілінде 387799 мәнімен count айнымалысын қалай жариялауға болады?
let count = 387799;
### Instruction: JavaScript тілінде 387799 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 387799;
73,101,667
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2097 високосным.
function isLeap() { let y = 2097; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2097 високосным. ### Response: function isLeap() { let y = 2097; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,223,685
ru
Java
var_decl
beginner
Как объявить переменную health со значением 847503 в Java?
int health = 847503;
### Instruction: Как объявить переменную health со значением 847503 в Java? ### Response: int health = 847503;
22,508,860
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; }
3,214,238
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 338831 в C#?
int amount = 338831;
### Instruction: Как объявить переменную amount со значением 338831 в C#? ### Response: int amount = 338831;
3,461,409
ru
C++
var_decl
beginner
Как объявить переменную result со значением 540515 в C++?
int result = 540515;
### Instruction: Как объявить переменную result со значением 540515 в C++? ### Response: int result = 540515;
1,632,620
kk
Java
var_decl
beginner
Java тілінде 178182 мәнімен count айнымалысын қалай жариялауға болады?
int count = 178182;
### Instruction: Java тілінде 178182 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 178182;
3,608,396
en
Python
var_decl
beginner
How to declare a variable buffer with value 719443 in Python?
buffer = 719443
### Instruction: How to declare a variable buffer with value 719443 in Python? ### Response: buffer = 719443
973,151
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 2153.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2153));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 2153. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2153));
89,820,067
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 232 простым.
public bool IsPrime() { int n = 232; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 232 простым. ### Response: public bool IsPrime() { int n = 232; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
870,520
kk
Python
sum_n
intermediate
Python тілінде 1-ден 3429-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3429))
### Instruction: Python тілінде 1-ден 3429-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3429))
45,907,782
ru
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; }
37,790,705
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2074 високосным.
public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2074 високосным. ### Response: public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
338,569
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 305.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(305)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 305. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(305)); }
89,276,658
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
75,297,427
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; }
76,015,871
en
C++
string_ops
intermediate
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
35,832,503
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; }
73,000,099
kk
Java
logic_ops
intermediate
Java тилінде 400 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 400; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 400 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 400; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,883,920
en
Java
logic_ops
intermediate
Write a function that determines if the number 377 is prime in Java.
public bool IsPrime() { int n = 377; 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 377 is prime in Java. ### Response: public bool IsPrime() { int n = 377; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,887,949
en
Python
var_decl
beginner
How to declare a variable data with value 758151 in Python?
data = 758151
### Instruction: How to declare a variable data with value 758151 in Python? ### Response: data = 758151
106,454
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 7600.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7600));
### Instruction: Write a function in JavaScript that calculates the factorial of 7600. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7600));
10,085,890
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2010 високосным.
public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2010 високосным. ### Response: public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
97,956,433
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; }