id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
19,878,380
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); }
96,928,348
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 302 is prime in JavaScript.
function isPrime() { let n = 302; 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 302 is prime in JavaScript. ### Response: function isPrime() { let n = 302; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
918,922
en
JavaScript
var_decl
beginner
How to declare a variable level with value 162031 in JavaScript?
let level = 162031;
### Instruction: How to declare a variable level with value 162031 in JavaScript? ### Response: let level = 162031;
92,746,578
ru
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; }
61,250,537
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,877,652
ru
Java
var_decl
beginner
Как объявить переменную health со значением 73775 в Java?
int health = 73775;
### Instruction: Как объявить переменную health со значением 73775 в Java? ### Response: int health = 73775;
2,113,696
kk
JavaScript
var_decl
beginner
JavaScript тілінде 207681 мәнімен index айнымалысын қалай жариялауға болады?
let index = 207681;
### Instruction: JavaScript тілінде 207681 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 207681;
732,610
kk
Python
var_decl
beginner
Python тілінде 145845 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 145845
### Instruction: Python тілінде 145845 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 145845
3,567,706
kk
C++
var_decl
beginner
C++ тілінде 49201 мәнімен count айнымалысын қалай жариялауға болады?
int count = 49201;
### Instruction: C++ тілінде 49201 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 49201;
25,397,417
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; }
3,696,992
ru
C++
var_decl
beginner
Как объявить переменную limit со значением 812133 в C++?
int limit = 812133;
### Instruction: Как объявить переменную limit со значением 812133 в C++? ### Response: int limit = 812133;
68,734,675
en
Java
logic_ops
advanced
Write logic to check if the year 2053 is a leap year in Java.
public bool IsLeap() { int y = 2053; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2053 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2053; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
88,272,842
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(); }
4,418,964
ru
Java
var_decl
beginner
Как объявить переменную score со значением 953371 в Java?
int score = 953371;
### Instruction: Как объявить переменную score со значением 953371 в Java? ### Response: int score = 953371;
4,273,081
en
Unity
var_decl
beginner
How to declare a variable data with value 692449 in Unity?
int data = 692449;
### Instruction: How to declare a variable data with value 692449 in Unity? ### Response: int data = 692449;
37,905,730
en
C#
logic_ops
intermediate
Write logic to check if the year 2002 is a leap year in C#.
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 C#. ### Response: public bool IsLeap() { int y = 2002; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
21,114,443
kk
C#
logic_ops
advanced
C# тилінде 468 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 468; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 468 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 468; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,378,233
en
C++
var_decl
beginner
How to declare a variable index with value 339987 in C++?
int index = 339987;
### Instruction: How to declare a variable index with value 339987 in C++? ### Response: int index = 339987;
35,647,170
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
23,182,344
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; }
700,929
kk
JavaScript
factorial
advanced
JavaScript тілінде 2630 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2630));
### Instruction: JavaScript тілінде 2630 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2630));
30,395,789
kk
C++
logic_ops
intermediate
C++ тилінде 1912 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1912 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1912; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,187,637
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 130 простым.
function isPrime() { let n = 130; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 130 простым. ### Response: function isPrime() { let n = 130; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
763,832
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 7848.
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(7848) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 7848. ### 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(7848) << std::endl;
3,043,531
en
C#
var_decl
beginner
How to declare a variable speed with value 415620 in C#?
int speed = 415620;
### Instruction: How to declare a variable speed with value 415620 in C#? ### Response: int speed = 415620;
75,777,773
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; }
45,738,513
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,468,873
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 569650 в Unity?
int count = 569650;
### Instruction: Как объявить переменную count со значением 569650 в Unity? ### Response: int count = 569650;
3,836,343
kk
Unity
var_decl
beginner
Unity тілінде 280521 мәнімен y айнымалысын қалай жариялауға болады?
int y = 280521;
### Instruction: Unity тілінде 280521 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 280521;
2,734,860
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 263171 в Unity?
int weight = 263171;
### Instruction: Как объявить переменную weight со значением 263171 в Unity? ### Response: int weight = 263171;
3,942,644
ru
Python
var_decl
beginner
Как объявить переменную total со значением 472549 в Python?
total = 472549
### Instruction: Как объявить переменную total со значением 472549 в Python? ### Response: total = 472549
21,632,327
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
89,053,934
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; }
873,406
en
C++
var_decl
beginner
How to declare a variable x with value 400817 in C++?
int x = 400817;
### Instruction: How to declare a variable x with value 400817 in C++? ### Response: int x = 400817;
52,892,306
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
34,458,980
en
C#
logic_ops
intermediate
Write logic to check if the year 2087 is a leap year in C#.
public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2087 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
84,593,596
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); }
34,069,876
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1956 високосным.
public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1956 високосным. ### Response: public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,682,237
ru
C#
array_ops
advanced
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
259,352
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 3976.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3976))
### Instruction: Write a function in Python that calculates the factorial of 3976. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3976))
34,632
kk
C#
factorial
advanced
C# тілінде 8089 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8089));
### Instruction: C# тілінде 8089 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8089));
4,563,723
en
JavaScript
var_decl
beginner
How to declare a variable size with value 32935 in JavaScript?
let size = 32935;
### Instruction: How to declare a variable size with value 32935 in JavaScript? ### Response: let size = 32935;
46,597,580
kk
Python
logic_ops
advanced
Python тилінде 143 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 143 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 143 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 143 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,267,129
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 694166 в Unity?
int total = 694166;
### Instruction: Как объявить переменную total со значением 694166 в Unity? ### Response: int total = 694166;
56,270,809
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 27 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 27; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 27 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 27; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
647,624
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 331028 в C#?
int buffer = 331028;
### Instruction: Как объявить переменную buffer со значением 331028 в C#? ### Response: int buffer = 331028;
14,082,148
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
27,045,294
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1966; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1966; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
41,111,167
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
2,399,728
en
C#
var_decl
beginner
How to declare a variable count with value 324650 in C#?
int count = 324650;
### Instruction: How to declare a variable count with value 324650 in C#? ### Response: int count = 324650;
2,860,081
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 171569 в C++?
int buffer = 171569;
### Instruction: Как объявить переменную buffer со значением 171569 в C++? ### Response: int buffer = 171569;
44,322
kk
JavaScript
factorial
advanced
JavaScript тілінде 7317 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7317));
### Instruction: JavaScript тілінде 7317 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7317));
4,534,552
kk
Unity
var_decl
beginner
Unity тілінде 425900 мәнімен index айнымалысын қалай жариялауға болады?
int index = 425900;
### Instruction: Unity тілінде 425900 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 425900;
13,984,269
en
Unity
logic_ops
intermediate
Write logic to check if the year 1911 is a leap year in Unity.
public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1911 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1911; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
21,308,832
en
Unity
logic_ops
advanced
Write logic to check if the year 1990 is a leap year in Unity.
public bool IsLeap() { int y = 1990; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1990 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1990; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
88,318,786
en
JavaScript
string_ops
intermediate
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();
92,918,638
en
C++
logic_ops
intermediate
Write logic to check if the year 1935 is a leap year in C++.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1935 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,757,672
kk
C++
var_decl
beginner
C++ тілінде 708707 мәнімен health айнымалысын қалай жариялауға болады?
int health = 708707;
### Instruction: C++ тілінде 708707 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 708707;
23,374,267
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]
113,704
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 9311.
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(9311) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 9311. ### 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(9311) << std::endl;
12,276,952
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
92,757,170
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1950 високосным.
public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1950 високосным. ### Response: public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
64,205,985
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1924 is a leap year in JavaScript.
function isLeap() { let y = 1924; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1924 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1924; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
54,670,486
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)
87,968,378
kk
Java
logic_ops
intermediate
Java тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1938; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1938; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
63,654
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 5456.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5456));
### Instruction: Write a function in JavaScript that calculates the factorial of 5456. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5456));
66,510,358
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 253 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 253; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 253 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 253; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
60,256,078
en
JavaScript
string_ops
intermediate
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();
603,283
kk
Unity
factorial
advanced
Unity тілінде 6465 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6465)); }
### Instruction: Unity тілінде 6465 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6465)); }
22,252,807
kk
Python
array_ops
advanced
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]
1,894,341
ru
Java
var_decl
beginner
Как объявить переменную value со значением 135764 в Java?
int value = 135764;
### Instruction: Как объявить переменную value со значением 135764 в Java? ### Response: int value = 135764;
22,416,578
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(); }
21,318,688
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
841,168
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 654382 в JavaScript?
let level = 654382;
### Instruction: Как объявить переменную level со значением 654382 в JavaScript? ### Response: let level = 654382;
2,413,975
ru
Python
var_decl
beginner
Как объявить переменную data со значением 455390 в Python?
data = 455390
### Instruction: Как объявить переменную data со значением 455390 в Python? ### Response: data = 455390
671,939
ru
Python
var_decl
beginner
Как объявить переменную size со значением 917201 в Python?
size = 917201
### Instruction: Как объявить переменную size со значением 917201 в Python? ### Response: size = 917201
3,498,924
kk
Python
var_decl
beginner
Python тілінде 140408 мәнімен level айнымалысын қалай жариялауға болады?
level = 140408
### Instruction: Python тілінде 140408 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 140408
789,767
en
Unity
var_decl
beginner
How to declare a variable index with value 200455 in Unity?
int index = 200455;
### Instruction: How to declare a variable index with value 200455 in Unity? ### Response: int index = 200455;
63,474,602
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
77,132,287
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
2,882,140
kk
C#
var_decl
beginner
C# тілінде 394049 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 394049;
### Instruction: C# тілінде 394049 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 394049;
71,968,688
ru
C#
array_ops
advanced
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
88,373,189
kk
C#
logic_ops
intermediate
C# тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
64,249,379
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
19,245,122
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
33,732,119
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
3,378,129
ru
Java
var_decl
beginner
Как объявить переменную value со значением 430403 в Java?
int value = 430403;
### Instruction: Как объявить переменную value со значением 430403 в Java? ### Response: int value = 430403;
70,947,505
en
C#
array_ops
advanced
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; }
20,093,443
en
C++
logic_ops
advanced
Write logic to check if the year 1945 is a leap year in C++.
public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1945 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,286,142
ru
Unity
array_ops
advanced
Напишите на 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; }
54,621,608
kk
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); }
345,959
kk
Unity
factorial
advanced
Unity тілінде 2127 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2127)); }
### Instruction: Unity тілінде 2127 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(2127)); }
28,216,615
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,545,589
ru
C++
var_decl
beginner
Как объявить переменную y со значением 55145 в C++?
int y = 55145;
### Instruction: Как объявить переменную y со значением 55145 в C++? ### Response: int y = 55145;
55,981,710
kk
C#
logic_ops
advanced
C# тилінде 80 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 80 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
11,072,813
kk
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; }
42,360,388
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 183 простым.
public bool IsPrime() { int n = 183; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 183 простым. ### Response: public bool IsPrime() { int n = 183; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
10,092,848
en
C++
string_ops
advanced
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; }
75,621,353
kk
Java
string_ops
intermediate
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
3,301,610
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 354204 in JavaScript?
let weight = 354204;
### Instruction: How to declare a variable weight with value 354204 in JavaScript? ### Response: let weight = 354204;