id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
62,241,689 | 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;
} |
3,545,255 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 397980 в Unity? | int amount = 397980; | ### Instruction:
Как объявить переменную amount со значением 397980 в Unity?
### Response:
int amount = 397980; |
2,582,116 | en | Unity | var_decl | beginner | How to declare a variable amount with value 121393 in Unity? | int amount = 121393; | ### Instruction:
How to declare a variable amount with value 121393 in Unity?
### Response:
int amount = 121393; |
3,130,646 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 597326 in JavaScript? | let level = 597326; | ### Instruction:
How to declare a variable level with value 597326 in JavaScript?
### Response:
let level = 597326; |
3,561,309 | en | Java | var_decl | beginner | How to declare a variable data with value 2861 in Java? | int data = 2861; | ### Instruction:
How to declare a variable data with value 2861 in Java?
### Response:
int data = 2861; |
2,493,348 | kk | C++ | var_decl | beginner | C++ тілінде 721357 мәнімен x айнымалысын қалай жариялауға болады? | int x = 721357; | ### Instruction:
C++ тілінде 721357 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 721357; |
49,556,616 | 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);
} |
90,381,288 | en | JavaScript | array_ops | advanced | 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); |
43,747,240 | kk | Java | array_ops | advanced | 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;
} |
57,340,443 | en | Unity | string_ops | intermediate | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
28,062 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 7990. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(7990)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 7990.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(7990)); |
79,035,219 | en | C# | logic_ops | intermediate | Write logic to check if the year 1954 is a leap year in C#. | public bool IsLeap() {
int y = 1954;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1954 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1954;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,320,311 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 167492 в Java? | int x = 167492; | ### Instruction:
Как объявить переменную x со значением 167492 в Java?
### Response:
int x = 167492; |
2,361,175 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 237676 в Python? | health = 237676 | ### Instruction:
Как объявить переменную health со значением 237676 в Python?
### Response:
health = 237676 |
4,469,937 | ru | Python | var_decl | beginner | Как объявить переменную y со значением 705665 в Python? | y = 705665 | ### Instruction:
Как объявить переменную y со значением 705665 в Python?
### Response:
y = 705665 |
1,504,457 | kk | Unity | var_decl | beginner | Unity тілінде 499783 мәнімен value айнымалысын қалай жариялауға болады? | int value = 499783; | ### Instruction:
Unity тілінде 499783 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 499783; |
16,301,119 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 350 простым. | public bool IsPrime() {
int n = 350;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 350 простым.
### Response:
public bool IsPrime() {
int n = 350;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
64,392,010 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 142 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 142;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 142 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 142;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,614,937 | kk | C# | var_decl | beginner | C# тілінде 675938 мәнімен data айнымалысын қалай жариялауға болады? | int data = 675938; | ### Instruction:
C# тілінде 675938 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 675938; |
257,842 | en | Python | var_decl | beginner | How to declare a variable buffer with value 680189 in Python? | buffer = 680189 | ### Instruction:
How to declare a variable buffer with value 680189 in Python?
### Response:
buffer = 680189 |
50,241,883 | kk | Unity | logic_ops | intermediate | Unity тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
18,128,412 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 254 простым. | function isPrime() {
let n = 254;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 254 простым.
### Response:
function isPrime() {
let n = 254;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,052,692 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 740811 in JavaScript? | let total = 740811; | ### Instruction:
How to declare a variable total with value 740811 in JavaScript?
### Response:
let total = 740811; |
98,725,081 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1961 високосным. | function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1961 високосным.
### Response:
function isLeap() {
let y = 1961;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
3,982,185 | ru | JavaScript | var_decl | beginner | Как объявить переменную size со значением 345166 в JavaScript? | let size = 345166; | ### Instruction:
Как объявить переменную size со значением 345166 в JavaScript?
### Response:
let size = 345166; |
56,739,313 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
1,514,421 | kk | Java | var_decl | beginner | Java тілінде 856326 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 856326; | ### Instruction:
Java тілінде 856326 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 856326; |
3,260,185 | kk | C# | var_decl | beginner | C# тілінде 403779 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 403779; | ### Instruction:
C# тілінде 403779 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 403779; |
773,205 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 7666. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7666)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 7666.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7666)); |
37,884,407 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
27,225,016 | en | Python | logic_ops | advanced | Write a function that determines if the number 428 is prime in Python. | def is_prime():
n = 428
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 428 is prime in Python.
### Response:
def is_prime():
n = 428
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
43,555,166 | en | Java | string_ops | advanced | 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;
} |
125,614 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 5091. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5091)); | ### Instruction:
Write a function in Java that calculates the factorial of 5091.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5091)); |
3,248,932 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 411106 в Java? | int size = 411106; | ### Instruction:
Как объявить переменную size со значением 411106 в Java?
### Response:
int size = 411106; |
48,551,812 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 415 простым. | public bool IsPrime() {
int n = 415;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 415 простым.
### Response:
public bool IsPrime() {
int n = 415;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,852,275 | kk | C++ | var_decl | beginner | C++ тілінде 578188 мәнімен index айнымалысын қалай жариялауға болады? | int index = 578188; | ### Instruction:
C++ тілінде 578188 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 578188; |
351,286 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 9069-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9069)) | ### Instruction:
Python тілінде 1-ден 9069-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9069)) |
68,700,870 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1990 високосным. | public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1990 високосным.
### Response:
public bool IsLeap() {
int y = 1990;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,508,233 | kk | C++ | array_ops | advanced | C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
18,386,708 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 2068 високосным. | def is_leap():
year = 2068
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 2068 високосным.
### Response:
def is_leap():
year = 2068
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
21,323,039 | en | JavaScript | array_ops | advanced | 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); |
65,051,535 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 236 is prime in JavaScript. | function isPrime() {
let n = 236;
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 236 is prime in JavaScript.
### Response:
function isPrime() {
let n = 236;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,327,213 | en | C# | var_decl | beginner | How to declare a variable count with value 71732 in C#? | int count = 71732; | ### Instruction:
How to declare a variable count with value 71732 in C#?
### Response:
int count = 71732; |
30,006,840 | kk | Java | array_ops | advanced | 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;
} |
73,379,201 | 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; |
21,338,098 | en | Python | string_ops | advanced | 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] |
3,073,445 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 643075 в Python? | health = 643075 | ### Instruction:
Как объявить переменную health со значением 643075 в Python?
### Response:
health = 643075 |
73,489,035 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2080 високосным. | public bool IsLeap() {
int y = 2080;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2080 високосным.
### Response:
public bool IsLeap() {
int y = 2080;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
540,999 | kk | JavaScript | factorial | advanced | JavaScript тілінде 1682 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1682)); | ### Instruction:
JavaScript тілінде 1682 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1682)); |
77,863,918 | 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;
} |
73,810,524 | 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();
} |
79,702,271 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
56,670,253 | en | C# | array_ops | advanced | Write a function that reverses a list in C#. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in C#.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
87,890,649 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 150 простым. | public bool IsPrime() {
int n = 150;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 150 простым.
### Response:
public bool IsPrime() {
int n = 150;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
39,875,310 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 2020 is a leap year in JavaScript. | function isLeap() {
let y = 2020;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2020 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2020;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,314,112 | kk | Unity | var_decl | beginner | Unity тілінде 854796 мәнімен data айнымалысын қалай жариялауға болады? | int data = 854796; | ### Instruction:
Unity тілінде 854796 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 854796; |
14,714,116 | 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,163,197 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 198830 in JavaScript? | let x = 198830; | ### Instruction:
How to declare a variable x with value 198830 in JavaScript?
### Response:
let x = 198830; |
4,282,430 | ru | JavaScript | var_decl | beginner | Как объявить переменную speed со значением 995106 в JavaScript? | let speed = 995106; | ### Instruction:
Как объявить переменную speed со значением 995106 в JavaScript?
### Response:
let speed = 995106; |
3,991,494 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 867785 в Unity? | int score = 867785; | ### Instruction:
Как объявить переменную score со значением 867785 в Unity?
### Response:
int score = 867785; |
585,823 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 465348 в C++? | int y = 465348; | ### Instruction:
Как объявить переменную y со значением 465348 в C++?
### Response:
int y = 465348; |
35,889,548 | kk | Python | logic_ops | advanced | Python тилінде 2070 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2070
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2070 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2070
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
31,069,580 | en | Python | array_ops | intermediate | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
37,476,010 | en | Unity | logic_ops | advanced | Write logic to check if the year 1979 is a leap year in Unity. | public bool IsLeap() {
int y = 1979;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1979 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1979;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
697,316 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 5563. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5563)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 5563.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5563)); |
38,139,895 | 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);
} |
99,366,453 | ru | 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] |
4,282,853 | kk | Python | var_decl | beginner | Python тілінде 340646 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 340646 | ### Instruction:
Python тілінде 340646 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 340646 |
1,437,796 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 630534 в Java? | int health = 630534; | ### Instruction:
Как объявить переменную health со значением 630534 в Java?
### Response:
int health = 630534; |
5,424 | kk | JavaScript | factorial | advanced | JavaScript тілінде 6654 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6654)); | ### Instruction:
JavaScript тілінде 6654 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6654)); |
86,494,220 | en | Java | string_ops | advanced | 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;
} |
11,601,766 | 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аеёиоуыэюя') |
26,607,214 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 2066 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2066;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2066 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2066;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,035,542 | en | C++ | var_decl | beginner | How to declare a variable offset with value 830905 in C++? | int offset = 830905; | ### Instruction:
How to declare a variable offset with value 830905 in C++?
### Response:
int offset = 830905; |
1,470,720 | kk | Unity | var_decl | beginner | Unity тілінде 40097 мәнімен data айнымалысын қалай жариялауға болады? | int data = 40097; | ### Instruction:
Unity тілінде 40097 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 40097; |
88,883,931 | en | Java | logic_ops | intermediate | Write a function that determines if the number 213 is prime in Java. | public bool IsPrime() {
int n = 213;
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 213 is prime in Java.
### Response:
public bool IsPrime() {
int n = 213;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
56,856,470 | 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);
} |
99,719,877 | kk | Python | logic_ops | advanced | Python тилінде 2013 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2013
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2013 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2013
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
48,781,221 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
22,165,455 | kk | C++ | string_ops | advanced | C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
418,904 | en | C++ | var_decl | beginner | How to declare a variable health with value 403023 in C++? | int health = 403023; | ### Instruction:
How to declare a variable health with value 403023 in C++?
### Response:
int health = 403023; |
173,077 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 2544. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2544)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 2544.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2544)); |
97,960,421 | kk | Python | logic_ops | intermediate | Python тилінде 1908 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1908
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1908 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1908
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
88,603,846 | en | C# | array_ops | intermediate | Write a function that filters only even numbers from a list in C#. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C#.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
1,566,645 | en | Python | var_decl | beginner | How to declare a variable score with value 129656 in Python? | score = 129656 | ### Instruction:
How to declare a variable score with value 129656 in Python?
### Response:
score = 129656 |
56,919,502 | kk | Unity | array_ops | intermediate | 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;
} |
10,946,884 | kk | Unity | logic_ops | advanced | Unity тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2099;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2099 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2099;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,231,131 | kk | Unity | var_decl | beginner | Unity тілінде 91082 мәнімен data айнымалысын қалай жариялауға болады? | int data = 91082; | ### Instruction:
Unity тілінде 91082 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 91082; |
416,736 | kk | Unity | factorial | advanced | Unity тілінде 6865 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6865));
} | ### Instruction:
Unity тілінде 6865 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6865));
} |
375,822 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 4585-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4585));
} | ### Instruction:
Unity тілінде 1-ден 4585-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4585));
} |
22,210,262 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1906 високосным. | public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1906 високосным.
### Response:
public bool IsLeap() {
int y = 1906;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
24,353,893 | 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;
} |
1,799,354 | ru | C++ | var_decl | beginner | Как объявить переменную x со значением 355619 в C++? | int x = 355619; | ### Instruction:
Как объявить переменную x со значением 355619 в C++?
### Response:
int x = 355619; |
3,068,962 | ru | C# | var_decl | beginner | Как объявить переменную data со значением 117424 в C#? | int data = 117424; | ### Instruction:
Как объявить переменную data со значением 117424 в C#?
### Response:
int data = 117424; |
79,303,714 | ru | C# | array_ops | intermediate | Напишите на C# функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C# функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
972,377 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 708197 in JavaScript? | let y = 708197; | ### Instruction:
How to declare a variable y with value 708197 in JavaScript?
### Response:
let y = 708197; |
123,178 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 9281-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9281)) | ### Instruction:
Python тілінде 1-ден 9281-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9281)) |
23,332,313 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
67,856,805 | en | JavaScript | string_ops | intermediate | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
775,974 | en | Java | var_decl | beginner | How to declare a variable limit with value 668420 in Java? | int limit = 668420; | ### Instruction:
How to declare a variable limit with value 668420 in Java?
### Response:
int limit = 668420; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.