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
1,806,528
kk
Java
var_decl
beginner
Java тілінде 21037 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 21037;
### Instruction: Java тілінде 21037 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 21037;
3,102,399
en
JavaScript
var_decl
beginner
How to declare a variable score with value 479889 in JavaScript?
let score = 479889;
### Instruction: How to declare a variable score with value 479889 in JavaScript? ### Response: let score = 479889;
55,216,544
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1977 високосным.
public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1977 високосным. ### Response: public bool IsLeap() { int y = 1977; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,545,816
en
JavaScript
var_decl
beginner
How to declare a variable data with value 113849 in JavaScript?
let data = 113849;
### Instruction: How to declare a variable data with value 113849 in JavaScript? ### Response: let data = 113849;
23,704,112
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
53,414,359
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; }
4,498,547
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 568369 в Unity?
int size = 568369;
### Instruction: Как объявить переменную size со значением 568369 в Unity? ### Response: int size = 568369;
4,433,472
ru
Java
var_decl
beginner
Как объявить переменную buffer со значением 779921 в Java?
int buffer = 779921;
### Instruction: Как объявить переменную buffer со значением 779921 в Java? ### Response: int buffer = 779921;
62,427
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 3228.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3228));
### Instruction: Write a function in C# that sums numbers from 1 to 3228. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3228));
2,541,745
en
Unity
var_decl
beginner
How to declare a variable value with value 698646 in Unity?
int value = 698646;
### Instruction: How to declare a variable value with value 698646 in Unity? ### Response: int value = 698646;
943,580
ru
JavaScript
var_decl
beginner
Как объявить переменную speed со значением 386002 в JavaScript?
let speed = 386002;
### Instruction: Как объявить переменную speed со значением 386002 в JavaScript? ### Response: let speed = 386002;
50,751,959
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
13,000,623
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
4,264,728
ru
Java
var_decl
beginner
Как объявить переменную total со значением 423789 в Java?
int total = 423789;
### Instruction: Как объявить переменную total со значением 423789 в Java? ### Response: int total = 423789;
727,765
kk
Python
sum_n
intermediate
Python тілінде 1-ден 9709-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9709))
### Instruction: Python тілінде 1-ден 9709-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9709))
14,556,640
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
22,497,921
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
14,265,000
kk
C++
logic_ops
advanced
C++ тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2018; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,927,453
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 584242 в Java?
int rate = 584242;
### Instruction: Как объявить переменную rate со значением 584242 в Java? ### Response: int rate = 584242;
4,709,876
kk
JavaScript
var_decl
beginner
JavaScript тілінде 370890 мәнімен speed айнымалысын қалай жариялауға болады?
let speed = 370890;
### Instruction: JavaScript тілінде 370890 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: let speed = 370890;
12,175,335
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
56,927,409
en
Unity
logic_ops
intermediate
Write a function that determines if the number 226 is prime in Unity.
public bool IsPrime() { int n = 226; 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 226 is prime in Unity. ### Response: public bool IsPrime() { int n = 226; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
791,549
ru
C#
var_decl
beginner
Как объявить переменную total со значением 224407 в C#?
int total = 224407;
### Instruction: Как объявить переменную total со значением 224407 в C#? ### Response: int total = 224407;
661,177
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 6120.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6120) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 6120. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6120) << std::endl;
36,403,402
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(); }
48,654,070
kk
C#
string_ops
intermediate
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; }
1,123,115
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 65369 в C++?
int timer = 65369;
### Instruction: Как объявить переменную timer со значением 65369 в C++? ### Response: int timer = 65369;
94,629,012
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; }
92,454,659
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
341,160
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5861.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5861)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5861. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5861)); }
87,994,436
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,183,253
en
C#
var_decl
beginner
How to declare a variable result with value 178740 in C#?
int result = 178740;
### Instruction: How to declare a variable result with value 178740 in C#? ### Response: int result = 178740;
15,031,440
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
19,998,679
en
Python
logic_ops
intermediate
Write a function that determines if the number 4 is prime in Python.
def is_prime(): n = 4 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 4 is prime in Python. ### Response: def is_prime(): n = 4 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
57,452,511
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,127,488
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 320376 в JavaScript?
let x = 320376;
### Instruction: Как объявить переменную x со значением 320376 в JavaScript? ### Response: let x = 320376;
723,387
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 9247.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9247) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 9247. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9247) << std::endl;
391,830
ru
C#
var_decl
beginner
Как объявить переменную size со значением 376441 в C#?
int size = 376441;
### Instruction: Как объявить переменную size со значением 376441 в C#? ### Response: int size = 376441;
11,974
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 5598-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5598));
### Instruction: JavaScript тілінде 1-ден 5598-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5598));
73,143,059
kk
Python
logic_ops
advanced
Python тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2095 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2095 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
10,511,562
en
C#
logic_ops
advanced
Write a function that determines if the number 231 is prime in C#.
public bool IsPrime() { int n = 231; 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 231 is prime in C#. ### Response: public bool IsPrime() { int n = 231; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
24,035,655
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(); }
93,647,630
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(); }
1,335,937
ru
Java
var_decl
beginner
Как объявить переменную score со значением 952395 в Java?
int score = 952395;
### Instruction: Как объявить переменную score со значением 952395 в Java? ### Response: int score = 952395;
3,967,966
en
Java
var_decl
beginner
How to declare a variable health with value 221463 in Java?
int health = 221463;
### Instruction: How to declare a variable health with value 221463 in Java? ### Response: int health = 221463;
31,877,225
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
3,502,755
en
Java
var_decl
beginner
How to declare a variable x with value 873244 in Java?
int x = 873244;
### Instruction: How to declare a variable x with value 873244 in Java? ### Response: int x = 873244;
40,308,573
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 38 простым.
def is_prime(): n = 38 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 38 простым. ### Response: def is_prime(): n = 38 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
86,275,832
ru
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); }
4,962,765
en
Python
var_decl
beginner
How to declare a variable value with value 763395 in Python?
value = 763395
### Instruction: How to declare a variable value with value 763395 in Python? ### Response: value = 763395
77,065,115
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
35,913,993
kk
Python
logic_ops
intermediate
Python тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 325 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 325 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 325 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,006,944
en
C++
var_decl
beginner
How to declare a variable x with value 466347 in C++?
int x = 466347;
### Instruction: How to declare a variable x with value 466347 in C++? ### Response: int x = 466347;
89,504,688
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; }
45,719,076
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
60,475,285
kk
Unity
string_ops
intermediate
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; }
107,989
kk
C#
sum_n
intermediate
C# тілінде 1-ден 7428-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7428));
### Instruction: C# тілінде 1-ден 7428-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7428));
25,869,178
kk
C++
logic_ops
advanced
C++ тилінде 79 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 79; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 79 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 79; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
76,225,842
kk
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]
427,699
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 4808.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4808))
### Instruction: Write a function in Python that sums numbers from 1 to 4808. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4808))
1,364,136
kk
Java
var_decl
beginner
Java тілінде 873019 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 873019;
### Instruction: Java тілінде 873019 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 873019;
21,664,168
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('');
81,998,951
kk
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);
57,049,585
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('');
49,031,086
en
Java
logic_ops
intermediate
Write a function that determines if the number 336 is prime in Java.
public bool IsPrime() { int n = 336; 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 336 is prime in Java. ### Response: public bool IsPrime() { int n = 336; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
589,349
kk
C#
var_decl
beginner
C# тілінде 300592 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 300592;
### Instruction: C# тілінде 300592 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 300592;
753,543
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 3093.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3093) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 3093. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3093) << std::endl;
31,631,471
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(); }
78,088,545
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
2,901,939
ru
Java
var_decl
beginner
Как объявить переменную buffer со значением 177113 в Java?
int buffer = 177113;
### Instruction: Как объявить переменную buffer со значением 177113 в Java? ### Response: int buffer = 177113;
2,729,643
kk
Python
var_decl
beginner
Python тілінде 890807 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 890807
### Instruction: Python тілінде 890807 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 890807
3,503,058
ru
C++
var_decl
beginner
Как объявить переменную value со значением 346415 в C++?
int value = 346415;
### Instruction: Как объявить переменную value со значением 346415 в C++? ### Response: int value = 346415;
3,024,886
en
Java
var_decl
beginner
How to declare a variable timer with value 673744 in Java?
int timer = 673744;
### Instruction: How to declare a variable timer with value 673744 in Java? ### Response: int timer = 673744;
98,693,888
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); }
4,046,235
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 11700 в C++?
int limit = 11700;
### Instruction: Как объявить переменную limit со значением 11700 в C++? ### Response: int limit = 11700;
65,403,546
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
1,843,706
en
Unity
var_decl
beginner
How to declare a variable count with value 525162 in Unity?
int count = 525162;
### Instruction: How to declare a variable count with value 525162 in Unity? ### Response: int count = 525162;
2,877,300
kk
Python
var_decl
beginner
Python тілінде 882192 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 882192
### Instruction: Python тілінде 882192 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 882192
39,249,648
kk
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; }
29,910,414
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
1,210,994
en
C++
var_decl
beginner
How to declare a variable rate with value 278556 in C++?
int rate = 278556;
### Instruction: How to declare a variable rate with value 278556 in C++? ### Response: int rate = 278556;
2,096,489
en
Unity
var_decl
beginner
How to declare a variable total with value 923892 in Unity?
int total = 923892;
### Instruction: How to declare a variable total with value 923892 in Unity? ### Response: int total = 923892;
73,070,396
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
4,911,985
en
Java
var_decl
beginner
How to declare a variable offset with value 113532 in Java?
int offset = 113532;
### Instruction: How to declare a variable offset with value 113532 in Java? ### Response: int offset = 113532;
23,449,729
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
93,114,669
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
412,460
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 8299.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8299)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 8299. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8299)); }
2,908,618
kk
JavaScript
var_decl
beginner
JavaScript тілінде 502048 мәнімен size айнымалысын қалай жариялауға болады?
let size = 502048;
### Instruction: JavaScript тілінде 502048 мәнімен size айнымалысын қалай жариялауға болады? ### Response: let size = 502048;
28,237,642
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 76 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 76; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 76 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 76; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,354,378
kk
Java
var_decl
beginner
Java тілінде 505279 мәнімен data айнымалысын қалай жариялауға болады?
int data = 505279;
### Instruction: Java тілінде 505279 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 505279;
91,795,121
en
C++
string_ops
advanced
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; }
98,295,615
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
4,183,543
kk
Java
var_decl
beginner
Java тілінде 70439 мәнімен y айнымалысын қалай жариялауға болады?
int y = 70439;
### Instruction: Java тілінде 70439 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 70439;
866,697
kk
C#
var_decl
beginner
C# тілінде 900161 мәнімен y айнымалысын қалай жариялауға болады?
int y = 900161;
### Instruction: C# тілінде 900161 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 900161;
32,107,331
kk
Python
logic_ops
intermediate
Python тилінде 164 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 164 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 164 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 164 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
41,540,183
ru
C#
string_ops
intermediate
Напишите на 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; }
36,736,002
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
88,726,253
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
44,304,412
kk
Java
logic_ops
advanced
Java тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,552,952
en
C#
var_decl
beginner
How to declare a variable timer with value 746295 in C#?
int timer = 746295;
### Instruction: How to declare a variable timer with value 746295 in C#? ### Response: int timer = 746295;