id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
95,674,677
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]
67,429,472
kk
Java
logic_ops
advanced
Java тилінде 258 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 258; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 258 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 258; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,803,510
en
JavaScript
var_decl
beginner
How to declare a variable total with value 917041 in JavaScript?
let total = 917041;
### Instruction: How to declare a variable total with value 917041 in JavaScript? ### Response: let total = 917041;
27,565,725
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
87,700,359
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; }
25,313,228
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
98,405,149
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1924; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1924; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
79,567,265
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,480,683
kk
Unity
var_decl
beginner
Unity тілінде 887642 мәнімен level айнымалысын қалай жариялауға болады?
int level = 887642;
### Instruction: Unity тілінде 887642 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 887642;
65,667,543
en
JavaScript
string_ops
intermediate
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
15,225,377
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 482 простым.
public bool IsPrime() { int n = 482; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 482 простым. ### Response: public bool IsPrime() { int n = 482; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,926,178
ru
Python
string_ops
advanced
Напишите на 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аеёиоуыэюя')
1,051,794
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 766726 в JavaScript?
let rate = 766726;
### Instruction: Как объявить переменную rate со значением 766726 в JavaScript? ### Response: let rate = 766726;
2,222,356
kk
JavaScript
var_decl
beginner
JavaScript тілінде 84182 мәнімен health айнымалысын қалай жариялауға болады?
let health = 84182;
### Instruction: JavaScript тілінде 84182 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 84182;
3,449,614
en
C#
var_decl
beginner
How to declare a variable data with value 375913 in C#?
int data = 375913;
### Instruction: How to declare a variable data with value 375913 in C#? ### Response: int data = 375913;
96,031,597
kk
C#
logic_ops
advanced
C# тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2095 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,141,904
ru
JavaScript
var_decl
beginner
Как объявить переменную amount со значением 119044 в JavaScript?
let amount = 119044;
### Instruction: Как объявить переменную amount со значением 119044 в JavaScript? ### Response: let amount = 119044;
50,783,372
kk
Python
logic_ops
advanced
Python тилінде 257 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 257 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 257 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 257 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
341,475
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 5253.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5253) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 5253. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5253) << std::endl;
548,284
ru
Python
var_decl
beginner
Как объявить переменную health со значением 695894 в Python?
health = 695894
### Instruction: Как объявить переменную health со значением 695894 в Python? ### Response: health = 695894
2,561,129
kk
Java
var_decl
beginner
Java тілінде 18985 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 18985;
### Instruction: Java тілінде 18985 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 18985;
35,890,265
kk
Unity
string_ops
advanced
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; }
869,594
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 3012.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3012)); }
### Instruction: Write a function in Unity that calculates the factorial of 3012. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3012)); }
29,428,420
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;
52,697,763
en
C++
logic_ops
advanced
Write logic to check if the year 1947 is a leap year in C++.
public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1947 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1947; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
72,972,078
kk
C++
logic_ops
intermediate
C++ тилінде 1913 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1913; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1913 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1913; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,850,493
en
C++
var_decl
beginner
How to declare a variable count with value 238589 in C++?
int count = 238589;
### Instruction: How to declare a variable count with value 238589 in C++? ### Response: int count = 238589;
92,221,879
en
Unity
array_ops
advanced
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); }
55,839,058
kk
C++
logic_ops
advanced
C++ тилінде 438 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 438 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 438; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
66,195
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 3286.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3286));
### Instruction: Write a function in JavaScript that calculates the factorial of 3286. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(3286));
83,437,997
en
C#
logic_ops
intermediate
Write logic to check if the year 1951 is a leap year in C#.
public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1951 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1951; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
83,096,608
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
55,441,434
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]
38,496,416
en
C++
string_ops
advanced
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
82,466,489
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; }
137,149
kk
C++
factorial
advanced
C++ тілінде 5169 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5169) << std::endl;
### Instruction: C++ тілінде 5169 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5169) << std::endl;
53,408,428
kk
Python
string_ops
advanced
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аеёиоуыэюя')
3,754,467
en
Java
var_decl
beginner
How to declare a variable x with value 174731 in Java?
int x = 174731;
### Instruction: How to declare a variable x with value 174731 in Java? ### Response: int x = 174731;
1,146,801
ru
Python
var_decl
beginner
Как объявить переменную value со значением 624892 в Python?
value = 624892
### Instruction: Как объявить переменную value со значением 624892 в Python? ### Response: value = 624892
24,716,672
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); }
1,247,972
ru
Unity
var_decl
beginner
Как объявить переменную offset со значением 640587 в Unity?
int offset = 640587;
### Instruction: Как объявить переменную offset со значением 640587 в Unity? ### Response: int offset = 640587;
195,316
kk
Unity
var_decl
beginner
Unity тілінде 78246 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 78246;
### Instruction: Unity тілінде 78246 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 78246;
397,220
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 594.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(594)); }
### Instruction: Write a function in Unity that calculates the factorial of 594. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(594)); }
23,949,787
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; }
11,791,673
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
22,519,701
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
50,510,725
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 50 простым.
def is_prime(): n = 50 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 50 простым. ### Response: def is_prime(): n = 50 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
22,472,740
en
C#
logic_ops
intermediate
Write a function that determines if the number 451 is prime in C#.
public bool IsPrime() { int n = 451; 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 451 is prime in C#. ### Response: public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
230,960
kk
Unity
factorial
advanced
Unity тілінде 845 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(845)); }
### Instruction: Unity тілінде 845 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(845)); }
50,859,337
kk
Java
logic_ops
intermediate
Java тилінде 64 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 64 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 64; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,157,634
en
Java
var_decl
beginner
How to declare a variable health with value 547244 in Java?
int health = 547244;
### Instruction: How to declare a variable health with value 547244 in Java? ### Response: int health = 547244;
2,013,491
kk
C#
var_decl
beginner
C# тілінде 75135 мәнімен result айнымалысын қалай жариялауға болады?
int result = 75135;
### Instruction: C# тілінде 75135 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 75135;
967,742
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 8825.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8825) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 8825. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8825) << std::endl;
49,201,981
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1934 високосным.
public bool IsLeap() { int y = 1934; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1934 високосным. ### Response: public bool IsLeap() { int y = 1934; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,041
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 7866.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7866));
### Instruction: Write a function in C# that sums numbers from 1 to 7866. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7866));
36,775
kk
C#
sum_n
intermediate
C# тілінде 1-ден 9789-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9789));
### Instruction: C# тілінде 1-ден 9789-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9789));
96,171,843
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; }
303,140
kk
Python
factorial
advanced
Python тілінде 4746 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4746))
### Instruction: Python тілінде 4746 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4746))
34,053,130
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
34,716,809
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
49,294,667
kk
C#
logic_ops
advanced
C# тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 56; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 56; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,546,717
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
82,015,670
kk
C++
string_ops
intermediate
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
75,994,399
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;
3,604,802
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 653113 в Unity?
int total = 653113;
### Instruction: Как объявить переменную total со значением 653113 в Unity? ### Response: int total = 653113;
55,218,261
kk
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; }
14,863,720
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; }
61,133,046
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 61 простым.
public bool IsPrime() { int n = 61; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 61 простым. ### Response: public bool IsPrime() { int n = 61; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,962,561
kk
C++
var_decl
beginner
C++ тілінде 550345 мәнімен size айнымалысын қалай жариялауға болады?
int size = 550345;
### Instruction: C++ тілінде 550345 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 550345;
36,935,162
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аеёиоуыэюя')
53,864,946
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; }
1,260,589
en
Python
var_decl
beginner
How to declare a variable y with value 319883 in Python?
y = 319883
### Instruction: How to declare a variable y with value 319883 in Python? ### Response: y = 319883
74,637,260
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1908 високосным.
public bool IsLeap() { int y = 1908; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1908 високосным. ### Response: public bool IsLeap() { int y = 1908; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,614
ru
C#
var_decl
beginner
Как объявить переменную result со значением 878289 в C#?
int result = 878289;
### Instruction: Как объявить переменную result со значением 878289 в C#? ### Response: int result = 878289;
83,692,525
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); }
21,725,923
kk
Python
string_ops
advanced
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аеёиоуыэюя')
1,239,928
kk
C#
var_decl
beginner
C# тілінде 286239 мәнімен count айнымалысын қалай жариялауға болады?
int count = 286239;
### Instruction: C# тілінде 286239 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 286239;
62,086,464
ru
Java
array_ops
intermediate
Напишите на 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; }
94,251,874
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
2,252,385
kk
C++
var_decl
beginner
C++ тілінде 742534 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 742534;
### Instruction: C++ тілінде 742534 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 742534;
4,644,342
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 935927 в C#?
int timer = 935927;
### Instruction: Как объявить переменную timer со значением 935927 в C#? ### Response: int timer = 935927;
97,057,966
en
C#
logic_ops
advanced
Write a function that determines if the number 205 is prime in C#.
public bool IsPrime() { int n = 205; 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 205 is prime in C#. ### Response: public bool IsPrime() { int n = 205; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,279,889
ru
Java
var_decl
beginner
Как объявить переменную level со значением 880681 в Java?
int level = 880681;
### Instruction: Как объявить переменную level со значением 880681 в Java? ### Response: int level = 880681;
53,078,796
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
16,694,148
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);
2,228,940
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 509614 в Python?
weight = 509614
### Instruction: Как объявить переменную weight со значением 509614 в Python? ### Response: weight = 509614
3,214,726
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 970534 в JavaScript?
let value = 970534;
### Instruction: Как объявить переменную value со значением 970534 в JavaScript? ### Response: let value = 970534;
1,424,349
kk
C++
var_decl
beginner
C++ тілінде 844664 мәнімен count айнымалысын қалай жариялауға болады?
int count = 844664;
### Instruction: C++ тілінде 844664 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 844664;
93,796,325
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;
2,359,424
en
Java
var_decl
beginner
How to declare a variable limit with value 265691 in Java?
int limit = 265691;
### Instruction: How to declare a variable limit with value 265691 in Java? ### Response: int limit = 265691;
711,617
en
JavaScript
var_decl
beginner
How to declare a variable count with value 317450 in JavaScript?
let count = 317450;
### Instruction: How to declare a variable count with value 317450 in JavaScript? ### Response: let count = 317450;
52,248,095
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
13,793,624
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(); }
68,903,490
kk
Unity
logic_ops
intermediate
Unity тилінде 225 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 225 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,306,458
kk
C++
var_decl
beginner
C++ тілінде 533093 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 533093;
### Instruction: C++ тілінде 533093 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 533093;
40,864
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 6847.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6847));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 6847. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6847));
26,786,565
en
C#
logic_ops
advanced
Write a function that determines if the number 314 is prime in C#.
public bool IsPrime() { int n = 314; 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 314 is prime in C#. ### Response: public bool IsPrime() { int n = 314; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
445,193
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 230766 в C++?
int timer = 230766;
### Instruction: Как объявить переменную timer со значением 230766 в C++? ### Response: int timer = 230766;
31,297,129
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('');
71,442,874
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 98 простым.
public bool IsPrime() { int n = 98; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 98 простым. ### Response: public bool IsPrime() { int n = 98; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }