id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
68,192,698
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1906 високосным.
def is_leap(): year = 1906 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1906 високосным. ### Response: def is_leap(): year = 1906 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
481,124
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5503.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5503)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5503. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5503)); }
790,769
ru
Java
var_decl
beginner
Как объявить переменную score со значением 162894 в Java?
int score = 162894;
### Instruction: Как объявить переменную score со значением 162894 в Java? ### Response: int score = 162894;
18,235,205
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
56,322,106
kk
C++
string_ops
intermediate
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; }
2,409,718
ru
Java
var_decl
beginner
Как объявить переменную health со значением 296400 в Java?
int health = 296400;
### Instruction: Как объявить переменную health со значением 296400 в Java? ### Response: int health = 296400;
382,361
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 7290.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7290)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 7290. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7290)); }
4,459,687
ru
C#
var_decl
beginner
Как объявить переменную level со значением 811787 в C#?
int level = 811787;
### Instruction: Как объявить переменную level со значением 811787 в C#? ### Response: int level = 811787;
31,883,554
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2009 високосным.
public bool IsLeap() { int y = 2009; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2009 високосным. ### Response: public bool IsLeap() { int y = 2009; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,219,291
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; }
94,274,746
en
C#
logic_ops
advanced
Write logic to check if the year 2040 is a leap year in C#.
public bool IsLeap() { int y = 2040; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2040 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2040; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
95,903,765
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); }
4,622,677
en
C++
var_decl
beginner
How to declare a variable count with value 232048 in C++?
int count = 232048;
### Instruction: How to declare a variable count with value 232048 in C++? ### Response: int count = 232048;
32,053,130
en
Unity
logic_ops
advanced
Write logic to check if the year 2002 is a leap year in Unity.
public bool IsLeap() { int y = 2002; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2002 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2002; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
20,985,717
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; }
742,716
kk
JavaScript
factorial
advanced
JavaScript тілінде 8360 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8360));
### Instruction: JavaScript тілінде 8360 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8360));
64,986,057
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 308 простым.
public bool IsPrime() { int n = 308; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 308 простым. ### Response: public bool IsPrime() { int n = 308; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,252,995
kk
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); }
3,479,191
en
C#
var_decl
beginner
How to declare a variable buffer with value 453393 in C#?
int buffer = 453393;
### Instruction: How to declare a variable buffer with value 453393 in C#? ### Response: int buffer = 453393;
96,410,446
kk
C++
logic_ops
intermediate
C++ тилінде 4 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 4 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,843,740
kk
Python
var_decl
beginner
Python тілінде 251713 мәнімен index айнымалысын қалай жариялауға болады?
index = 251713
### Instruction: Python тілінде 251713 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 251713
63,962,002
kk
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аеёиоуыэюя')
67,769,469
en
C#
logic_ops
advanced
Write logic to check if the year 1914 is a leap year in C#.
public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1914 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,649,845
kk
Python
var_decl
beginner
Python тілінде 337111 мәнімен index айнымалысын қалай жариялауға болады?
index = 337111
### Instruction: Python тілінде 337111 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 337111
62,886,824
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; }
83,299,755
kk
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; }
1,485,626
en
Java
var_decl
beginner
How to declare a variable amount with value 365588 in Java?
int amount = 365588;
### Instruction: How to declare a variable amount with value 365588 in Java? ### Response: int amount = 365588;
4,456,468
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 344768 в Java?
int speed = 344768;
### Instruction: Как объявить переменную speed со значением 344768 в Java? ### Response: int speed = 344768;
84,210,749
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 52 простым.
public bool IsPrime() { int n = 52; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 52 простым. ### Response: public bool IsPrime() { int n = 52; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,699,129
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 519691 в C#?
int speed = 519691;
### Instruction: Как объявить переменную speed со значением 519691 в C#? ### Response: int speed = 519691;
39,456,084
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 31 простым.
def is_prime(): n = 31 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 31 простым. ### Response: def is_prime(): n = 31 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
39,200,632
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2083 is a leap year in JavaScript.
function isLeap() { let y = 2083; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2083 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2083; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
97,563,164
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
432,623
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 6638.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6638)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 6638. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6638)); }
89,643
en
C++
var_decl
beginner
How to declare a variable health with value 568726 in C++?
int health = 568726;
### Instruction: How to declare a variable health with value 568726 in C++? ### Response: int health = 568726;
56,306,220
en
Java
array_ops
intermediate
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); }
4,249,877
kk
JavaScript
var_decl
beginner
JavaScript тілінде 840759 мәнімен size айнымалысын қалай жариялауға болады?
let size = 840759;
### Instruction: JavaScript тілінде 840759 мәнімен size айнымалысын қалай жариялауға болады? ### Response: let size = 840759;
42,687,166
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
35,257,946
en
Python
logic_ops
advanced
Write a function that determines if the number 189 is prime in Python.
def is_prime(): n = 189 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 189 is prime in Python. ### Response: def is_prime(): n = 189 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,207,813
kk
JavaScript
var_decl
beginner
JavaScript тілінде 860365 мәнімен size айнымалысын қалай жариялауға болады?
let size = 860365;
### Instruction: JavaScript тілінде 860365 мәнімен size айнымалысын қалай жариялауға болады? ### Response: let size = 860365;
290,016
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 8575.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8575));
### Instruction: Write a function in C# that sums numbers from 1 to 8575. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8575));
51,420,586
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2088 високосным.
public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2088 високосным. ### Response: public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,522,338
en
C++
var_decl
beginner
How to declare a variable y with value 403422 in C++?
int y = 403422;
### Instruction: How to declare a variable y with value 403422 in C++? ### Response: int y = 403422;
89,122,511
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
2,508,613
en
Python
var_decl
beginner
How to declare a variable size with value 858764 in Python?
size = 858764
### Instruction: How to declare a variable size with value 858764 in Python? ### Response: size = 858764
10,082,211
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; }
46,935,573
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; }
53,639,059
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; }
175,390
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 927302 в JavaScript?
let rate = 927302;
### Instruction: Как объявить переменную rate со значением 927302 в JavaScript? ### Response: let rate = 927302;
4,434,705
kk
JavaScript
var_decl
beginner
JavaScript тілінде 663371 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 663371;
### Instruction: JavaScript тілінде 663371 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 663371;
4,018,131
ru
Python
var_decl
beginner
Как объявить переменную level со значением 714518 в Python?
level = 714518
### Instruction: Как объявить переменную level со значением 714518 в Python? ### Response: level = 714518
85,667,938
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2017; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2017; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
43,364,355
kk
C++
logic_ops
intermediate
C++ тилінде 404 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 404; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 404 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 404; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
33,334,678
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; }
43,313,056
kk
Python
logic_ops
advanced
Python тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1904 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1904 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
50,074,818
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
20,918,245
en
C++
logic_ops
advanced
Write logic to check if the year 2049 is a leap year in C++.
public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2049 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
68,060,999
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;
87,925,717
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
51,356,256
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
33,993,381
en
Java
logic_ops
intermediate
Write logic to check if the year 2096 is a leap year in Java.
public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2096 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
910,443
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 211018 в JavaScript?
let score = 211018;
### Instruction: Как объявить переменную score со значением 211018 в JavaScript? ### Response: let score = 211018;
4,094,014
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 997262 в Unity?
int rate = 997262;
### Instruction: Как объявить переменную rate со значением 997262 в Unity? ### Response: int rate = 997262;
69,874,743
en
Unity
array_ops
intermediate
Write a function that finds the maximum number in an array in Unity.
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 Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
161,933
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 9896.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9896)); }
### Instruction: Write a function in Unity that calculates the factorial of 9896. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9896)); }
25,587,949
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 321 is prime in JavaScript.
function isPrime() { let n = 321; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 321 is prime in JavaScript. ### Response: function isPrime() { let n = 321; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
848,012
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 46549 in JavaScript?
let speed = 46549;
### Instruction: How to declare a variable speed with value 46549 in JavaScript? ### Response: let speed = 46549;
32,158,354
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,124,136
kk
C++
var_decl
beginner
C++ тілінде 817676 мәнімен result айнымалысын қалай жариялауға болады?
int result = 817676;
### Instruction: C++ тілінде 817676 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 817676;
32,549,873
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]
42,181,410
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
4,728,845
kk
Unity
var_decl
beginner
Unity тілінде 175439 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 175439;
### Instruction: Unity тілінде 175439 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 175439;
77,981,551
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; }
307,359
en
C++
var_decl
beginner
How to declare a variable rate with value 44153 in C++?
int rate = 44153;
### Instruction: How to declare a variable rate with value 44153 in C++? ### Response: int rate = 44153;
28,525,440
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 363 простым.
public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 363 простым. ### Response: public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
32,265,981
en
C++
logic_ops
intermediate
Write a function that determines if the number 217 is prime in C++.
public bool IsPrime() { int n = 217; 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 217 is prime in C++. ### Response: public bool IsPrime() { int n = 217; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
96,391,638
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2084 високосным.
def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2084 високосным. ### Response: def is_leap(): year = 2084 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
934,106
en
Java
var_decl
beginner
How to declare a variable offset with value 87536 in Java?
int offset = 87536;
### Instruction: How to declare a variable offset with value 87536 in Java? ### Response: int offset = 87536;
73,005,699
en
Python
logic_ops
intermediate
Write logic to check if the year 1986 is a leap year in Python.
def is_leap(): year = 1986 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1986 is a leap year in Python. ### Response: def is_leap(): year = 1986 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
13,368,734
kk
C#
string_ops
intermediate
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; }
85,788,934
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; }
44,353,489
en
Python
logic_ops
intermediate
Write a function that determines if the number 249 is prime in Python.
def is_prime(): n = 249 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 249 is prime in Python. ### Response: def is_prime(): n = 249 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
48,687,416
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
48,131,765
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
94,494,170
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(); }
80,460,066
ru
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; }
4,718,666
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 337850 in JavaScript?
let speed = 337850;
### Instruction: How to declare a variable speed with value 337850 in JavaScript? ### Response: let speed = 337850;
19,602,917
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; }
91,519,538
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 419 простым.
public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 419 простым. ### Response: public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
62,777,732
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
96,941,467
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
4,085,467
kk
C#
var_decl
beginner
C# тілінде 357294 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 357294;
### Instruction: C# тілінде 357294 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 357294;
464,613
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 3520.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3520))
### Instruction: Write a function in Python that calculates the factorial of 3520. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3520))
276,693
en
Java
var_decl
beginner
How to declare a variable size with value 353585 in Java?
int size = 353585;
### Instruction: How to declare a variable size with value 353585 in Java? ### Response: int size = 353585;
11,510,905
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
17,219,371
kk
Java
string_ops
advanced
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; }
2,417,541
en
Java
var_decl
beginner
How to declare a variable rate with value 621794 in Java?
int rate = 621794;
### Instruction: How to declare a variable rate with value 621794 in Java? ### Response: int rate = 621794;
1,436,122
kk
JavaScript
var_decl
beginner
JavaScript тілінде 404217 мәнімен count айнымалысын қалай жариялауға болады?
let count = 404217;
### Instruction: JavaScript тілінде 404217 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 404217;
266,399
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 1948.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1948));
### Instruction: Write a function in C# that sums numbers from 1 to 1948. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1948));
2,632,587
en
Unity
var_decl
beginner
How to declare a variable amount with value 727285 in Unity?
int amount = 727285;
### Instruction: How to declare a variable amount with value 727285 in Unity? ### Response: int amount = 727285;