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
832,888
kk
Java
factorial
advanced
Java тілінде 8820 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8820));
### Instruction: Java тілінде 8820 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8820));
49,356,645
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 327 простым.
function isPrime() { let n = 327; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 327 простым. ### Response: function isPrime() { let n = 327; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
68,271,232
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 62 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 62; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 62 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 62; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
34,053,702
kk
Java
logic_ops
advanced
Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1910; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1910; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,409,854
ru
C#
var_decl
beginner
Как объявить переменную weight со значением 918337 в C#?
int weight = 918337;
### Instruction: Как объявить переменную weight со значением 918337 в C#? ### Response: int weight = 918337;
77,479,368
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]
1,026,065
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 6617.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6617))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 6617. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6617))
772,022
en
Java
var_decl
beginner
How to declare a variable total with value 315468 in Java?
int total = 315468;
### Instruction: How to declare a variable total with value 315468 in Java? ### Response: int total = 315468;
732,325
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 4965 в Python?
weight = 4965
### Instruction: Как объявить переменную weight со значением 4965 в Python? ### Response: weight = 4965
3,543,714
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 472649 в Unity?
int value = 472649;
### Instruction: Как объявить переменную value со значением 472649 в Unity? ### Response: int value = 472649;
1,903,386
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 690455 в C#?
int timer = 690455;
### Instruction: Как объявить переменную timer со значением 690455 в C#? ### Response: int timer = 690455;
4,017,488
en
Java
var_decl
beginner
How to declare a variable result with value 395981 in Java?
int result = 395981;
### Instruction: How to declare a variable result with value 395981 in Java? ### Response: int result = 395981;
2,889,764
kk
JavaScript
var_decl
beginner
JavaScript тілінде 448834 мәнімен result айнымалысын қалай жариялауға болады?
let result = 448834;
### Instruction: JavaScript тілінде 448834 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 448834;
132,404
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 1300.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1300));
### Instruction: Write a function in C# that calculates the factorial of 1300. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(1300));
35,844,602
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 194 простым.
public bool IsPrime() { int n = 194; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 194 простым. ### Response: public bool IsPrime() { int n = 194; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
389,326
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 2705.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2705));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 2705. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2705));
92,117,611
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;
58,450,496
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;
57,993,586
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
1,088,401
en
Unity
var_decl
beginner
How to declare a variable limit with value 808191 in Unity?
int limit = 808191;
### Instruction: How to declare a variable limit with value 808191 in Unity? ### Response: int limit = 808191;
774,321
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 72726 в Python?
limit = 72726
### Instruction: Как объявить переменную limit со значением 72726 в Python? ### Response: limit = 72726
483,541
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9877.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9877));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9877. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9877));
73,108,374
en
Java
logic_ops
advanced
Write logic to check if the year 1915 is a leap year in Java.
public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1915 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,916,500
kk
Python
var_decl
beginner
Python тілінде 721158 мәнімен index айнымалысын қалай жариялауға болады?
index = 721158
### Instruction: Python тілінде 721158 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 721158
94,369,889
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;
3,533,149
ru
C#
var_decl
beginner
Как объявить переменную result со значением 328441 в C#?
int result = 328441;
### Instruction: Как объявить переменную result со значением 328441 в C#? ### Response: int result = 328441;
41,864,866
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
89,052,809
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(); }
2,743,902
en
Unity
var_decl
beginner
How to declare a variable limit with value 651927 in Unity?
int limit = 651927;
### Instruction: How to declare a variable limit with value 651927 in Unity? ### Response: int limit = 651927;
23,437,222
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(); }
99,598,082
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; }
63,973,212
en
Java
string_ops
intermediate
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(); }
14,438,237
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); }
79,069,365
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; }
92,269,447
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
4,592,410
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 319952 in JavaScript?
let weight = 319952;
### Instruction: How to declare a variable weight with value 319952 in JavaScript? ### Response: let weight = 319952;
1,620,588
en
Unity
var_decl
beginner
How to declare a variable index with value 580790 in Unity?
int index = 580790;
### Instruction: How to declare a variable index with value 580790 in Unity? ### Response: int index = 580790;
3,272,525
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 726035 в JavaScript?
let timer = 726035;
### Instruction: Как объявить переменную timer со значением 726035 в JavaScript? ### Response: let timer = 726035;
2,129,666
kk
JavaScript
var_decl
beginner
JavaScript тілінде 958547 мәнімен health айнымалысын қалай жариялауға болады?
let health = 958547;
### Instruction: JavaScript тілінде 958547 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 958547;
485,538
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 5527.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5527));
### Instruction: Write a function in C# that sums numbers from 1 to 5527. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5527));
1,125,381
ru
Python
var_decl
beginner
Как объявить переменную x со значением 604769 в Python?
x = 604769
### Instruction: Как объявить переменную x со значением 604769 в Python? ### Response: x = 604769
4,711,268
en
Python
var_decl
beginner
How to declare a variable count with value 909746 in Python?
count = 909746
### Instruction: How to declare a variable count with value 909746 in Python? ### Response: count = 909746
1,803,001
ru
C#
var_decl
beginner
Как объявить переменную value со значением 381417 в C#?
int value = 381417;
### Instruction: Как объявить переменную value со значением 381417 в C#? ### Response: int value = 381417;
840,990
kk
C++
var_decl
beginner
C++ тілінде 245599 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 245599;
### Instruction: C++ тілінде 245599 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 245599;
1,951,395
kk
C++
var_decl
beginner
C++ тілінде 600155 мәнімен score айнымалысын қалай жариялауға болады?
int score = 600155;
### Instruction: C++ тілінде 600155 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 600155;
1,712,092
kk
JavaScript
var_decl
beginner
JavaScript тілінде 827989 мәнімен y айнымалысын қалай жариялауға болады?
let y = 827989;
### Instruction: JavaScript тілінде 827989 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 827989;
20,545,706
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,419,640
kk
C++
var_decl
beginner
C++ тілінде 406621 мәнімен level айнымалысын қалай жариялауға болады?
int level = 406621;
### Instruction: C++ тілінде 406621 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 406621;
557,661
en
JavaScript
var_decl
beginner
How to declare a variable buffer with value 29667 in JavaScript?
let buffer = 29667;
### Instruction: How to declare a variable buffer with value 29667 in JavaScript? ### Response: let buffer = 29667;
2,306,342
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 639813 в Java?
int rate = 639813;
### Instruction: Как объявить переменную rate со значением 639813 в Java? ### Response: int rate = 639813;
62,153,255
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
15,567,269
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;
1,125,189
kk
Java
var_decl
beginner
Java тілінде 545898 мәнімен count айнымалысын қалай жариялауға болады?
int count = 545898;
### Instruction: Java тілінде 545898 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 545898;
3,830,692
kk
Python
var_decl
beginner
Python тілінде 171662 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 171662
### Instruction: Python тілінде 171662 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 171662
92,671
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 2048.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(2048) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 2048. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(2048) << std::endl;
64,124,089
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; }
435,709
en
JavaScript
var_decl
beginner
How to declare a variable size with value 804916 in JavaScript?
let size = 804916;
### Instruction: How to declare a variable size with value 804916 in JavaScript? ### Response: let size = 804916;
342,083
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 3867.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3867) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 3867. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3867) << std::endl;
44,493,983
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1982 високосным.
public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1982 високосным. ### Response: public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
48,404,387
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]
2,534,722
kk
C#
var_decl
beginner
C# тілінде 213502 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 213502;
### Instruction: C# тілінде 213502 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 213502;
25,481,558
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; }
3,488,029
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 973416 в C++?
int buffer = 973416;
### Instruction: Как объявить переменную buffer со значением 973416 в C++? ### Response: int buffer = 973416;
35,903,290
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; }
4,389,608
kk
Python
var_decl
beginner
Python тілінде 107738 мәнімен health айнымалысын қалай жариялауға болады?
health = 107738
### Instruction: Python тілінде 107738 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 107738
2,200,864
kk
Unity
var_decl
beginner
Unity тілінде 289935 мәнімен index айнымалысын қалай жариялауға болады?
int index = 289935;
### Instruction: Unity тілінде 289935 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 289935;
267,167
kk
C#
sum_n
intermediate
C# тілінде 1-ден 9358-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9358));
### Instruction: C# тілінде 1-ден 9358-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9358));
3,582,093
kk
C#
var_decl
beginner
C# тілінде 500170 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 500170;
### Instruction: C# тілінде 500170 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 500170;
2,412,016
en
C#
var_decl
beginner
How to declare a variable limit with value 393954 in C#?
int limit = 393954;
### Instruction: How to declare a variable limit with value 393954 in C#? ### Response: int limit = 393954;
29,622,634
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; }
59,996,973
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]
38,252,345
en
Unity
logic_ops
intermediate
Write a function that determines if the number 210 is prime in Unity.
public bool IsPrime() { int n = 210; 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 210 is prime in Unity. ### Response: public bool IsPrime() { int n = 210; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
410,962
kk
JavaScript
factorial
advanced
JavaScript тілінде 4925 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4925));
### Instruction: JavaScript тілінде 4925 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(4925));
4,565,361
kk
JavaScript
var_decl
beginner
JavaScript тілінде 187054 мәнімен data айнымалысын қалай жариялауға болады?
let data = 187054;
### Instruction: JavaScript тілінде 187054 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 187054;
65,889,711
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 354 простым.
public bool IsPrime() { int n = 354; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 354 простым. ### Response: public bool IsPrime() { int n = 354; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,391,029
kk
Python
var_decl
beginner
Python тілінде 448041 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 448041
### Instruction: Python тілінде 448041 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 448041
18,685,299
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(); }
2,340,350
ru
Python
var_decl
beginner
Как объявить переменную speed со значением 913726 в Python?
speed = 913726
### Instruction: Как объявить переменную speed со значением 913726 в Python? ### Response: speed = 913726
332,595
kk
C++
factorial
advanced
C++ тілінде 579 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(579) << std::endl;
### Instruction: C++ тілінде 579 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(579) << std::endl;
4,528,665
en
Python
var_decl
beginner
How to declare a variable y with value 614352 in Python?
y = 614352
### Instruction: How to declare a variable y with value 614352 in Python? ### Response: y = 614352
210,070
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 6162.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6162) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 6162. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6162) << std::endl;
2,223,058
kk
Python
var_decl
beginner
Python тілінде 94176 мәнімен level айнымалысын қалай жариялауға болады?
level = 94176
### Instruction: Python тілінде 94176 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 94176
42,786,751
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
91,072,001
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; }
2,808,326
kk
JavaScript
var_decl
beginner
JavaScript тілінде 961350 мәнімен result айнымалысын қалай жариялауға болады?
let result = 961350;
### Instruction: JavaScript тілінде 961350 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 961350;
75,874,975
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; }
38,226,059
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); }
14,651,615
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]
29,627
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 439365 в Python?
rate = 439365
### Instruction: Как объявить переменную rate со значением 439365 в Python? ### Response: rate = 439365
69,671,786
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
48,628,766
kk
C#
logic_ops
advanced
C# тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1901 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1901; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
80,099,063
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
30,889,033
kk
Unity
logic_ops
intermediate
Unity тилінде 129 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 129; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 129 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 129; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
87,516,455
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
73,756,434
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
3,689,807
kk
Python
var_decl
beginner
Python тілінде 786656 мәнімен x айнымалысын қалай жариялауға болады?
x = 786656
### Instruction: Python тілінде 786656 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 786656
4,641,368
en
C++
var_decl
beginner
How to declare a variable amount with value 850701 in C++?
int amount = 850701;
### Instruction: How to declare a variable amount with value 850701 in C++? ### Response: int amount = 850701;
173,679
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 5028.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5028));
### Instruction: Write a function in C# that calculates the factorial of 5028. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5028));
2,408,961
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 220385 в JavaScript?
let value = 220385;
### Instruction: Как объявить переменную value со значением 220385 в JavaScript? ### Response: let value = 220385;
39,993,510
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }