id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
19,986,883
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);
50,834,545
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аеёиоуыэюя')
84,355,871
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); }
27,598,098
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; }
2,687,673
kk
C++
var_decl
beginner
C++ тілінде 781015 мәнімен value айнымалысын қалай жариялауға болады?
int value = 781015;
### Instruction: C++ тілінде 781015 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 781015;
3,727,457
en
C++
var_decl
beginner
How to declare a variable score with value 122013 in C++?
int score = 122013;
### Instruction: How to declare a variable score with value 122013 in C++? ### Response: int score = 122013;
1,757,214
kk
C++
var_decl
beginner
C++ тілінде 675081 мәнімен y айнымалысын қалай жариялауға болады?
int y = 675081;
### Instruction: C++ тілінде 675081 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 675081;
30,791,848
en
Python
logic_ops
advanced
Write a function that determines if the number 231 is prime in Python.
def is_prime(): n = 231 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 231 is prime in Python. ### Response: def is_prime(): n = 231 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
91,711,402
en
JavaScript
string_ops
advanced
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('');
2,902,565
en
JavaScript
var_decl
beginner
How to declare a variable result with value 490583 in JavaScript?
let result = 490583;
### Instruction: How to declare a variable result with value 490583 in JavaScript? ### Response: let result = 490583;
37,414,472
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
224,274
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 6351.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6351))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 6351. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6351))
47,842
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 281.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(281)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 281. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(281)); }
831,492
kk
Python
factorial
advanced
Python тілінде 7026 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7026))
### Instruction: Python тілінде 7026 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7026))
63,773,701
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();
76,070,556
en
C#
string_ops
advanced
Write a function that converts a string to uppercase in C#.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C#. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
2,005,946
kk
Unity
var_decl
beginner
Unity тілінде 123236 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 123236;
### Instruction: Unity тілінде 123236 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 123236;
49,541,657
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2100 високосным.
public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2100 високосным. ### Response: public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,546,004
en
C++
logic_ops
advanced
Write a function that determines if the number 480 is prime in C++.
public bool IsPrime() { int n = 480; 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 480 is prime in C++. ### Response: public bool IsPrime() { int n = 480; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
354,604
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 588-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(588));
### Instruction: JavaScript тілінде 1-ден 588-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(588));
92,598,700
en
C#
logic_ops
advanced
Write a function that determines if the number 259 is prime in C#.
public bool IsPrime() { int n = 259; 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 259 is prime in C#. ### Response: public bool IsPrime() { int n = 259; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
27,714,558
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2047 високосным.
public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2047 високосным. ### Response: public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
973,297
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 205770 в Java?
int weight = 205770;
### Instruction: Как объявить переменную weight со значением 205770 в Java? ### Response: int weight = 205770;
3,789,646
en
Unity
var_decl
beginner
How to declare a variable offset with value 369065 in Unity?
int offset = 369065;
### Instruction: How to declare a variable offset with value 369065 in Unity? ### Response: int offset = 369065;
1,951,134
en
Python
var_decl
beginner
How to declare a variable limit with value 643379 in Python?
limit = 643379
### Instruction: How to declare a variable limit with value 643379 in Python? ### Response: limit = 643379
1,644,251
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 503740 в JavaScript?
let index = 503740;
### Instruction: Как объявить переменную index со значением 503740 в JavaScript? ### Response: let index = 503740;
73,315,777
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();
90,869,565
en
Unity
logic_ops
advanced
Write logic to check if the year 1960 is a leap year in Unity.
public bool IsLeap() { int y = 1960; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1960 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1960; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
74,422,374
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; }
213,113
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 5018.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5018)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 5018. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5018)); }
85,049,038
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 498 простым.
public bool IsPrime() { int n = 498; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 498 простым. ### Response: public bool IsPrime() { int n = 498; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
51,848,188
en
Java
string_ops
intermediate
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
23,304,738
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; }
2,502,947
kk
C#
var_decl
beginner
C# тілінде 116616 мәнімен result айнымалысын қалай жариялауға болады?
int result = 116616;
### Instruction: C# тілінде 116616 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 116616;
60,659,254
en
C++
array_ops
intermediate
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; }
2,410,889
en
JavaScript
var_decl
beginner
How to declare a variable level with value 899425 in JavaScript?
let level = 899425;
### Instruction: How to declare a variable level with value 899425 in JavaScript? ### Response: let level = 899425;
34,820,342
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 404 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 404; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 404 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 404; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
42,537,845
kk
C#
logic_ops
advanced
C# тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
661,635
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 6645-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6645)); }
### Instruction: Unity тілінде 1-ден 6645-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6645)); }
1,817,603
en
Java
var_decl
beginner
How to declare a variable buffer with value 310289 in Java?
int buffer = 310289;
### Instruction: How to declare a variable buffer with value 310289 in Java? ### Response: int buffer = 310289;
3,705,632
ru
Java
var_decl
beginner
Как объявить переменную value со значением 567636 в Java?
int value = 567636;
### Instruction: Как объявить переменную value со значением 567636 в Java? ### Response: int value = 567636;
97,446,572
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 89 простым.
public bool IsPrime() { int n = 89; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 89 простым. ### Response: public bool IsPrime() { int n = 89; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,054,578
ru
Java
var_decl
beginner
Как объявить переменную data со значением 717193 в Java?
int data = 717193;
### Instruction: Как объявить переменную data со значением 717193 в Java? ### Response: int data = 717193;
103,963
kk
C++
factorial
advanced
C++ тілінде 7737 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7737) << std::endl;
### Instruction: C++ тілінде 7737 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7737) << std::endl;
15,562,672
en
Unity
string_ops
intermediate
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
24,542,850
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 395 простым.
public bool IsPrime() { int n = 395; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 395 простым. ### Response: public bool IsPrime() { int n = 395; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,712,584
en
C#
logic_ops
intermediate
Write logic to check if the year 1961 is a leap year in C#.
public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1961 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,284,224
kk
Unity
logic_ops
intermediate
Unity тилінде 341 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 341; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 341 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 341; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
46,344,991
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); }
84,947,328
kk
Python
logic_ops
intermediate
Python тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 123 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 123 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
78,697,798
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,176,082
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 705831 в JavaScript?
let health = 705831;
### Instruction: Как объявить переменную health со значением 705831 в JavaScript? ### Response: let health = 705831;
1,832,489
kk
C#
var_decl
beginner
C# тілінде 459881 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 459881;
### Instruction: C# тілінде 459881 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 459881;
3,975,621
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 632125 в JavaScript?
let weight = 632125;
### Instruction: Как объявить переменную weight со значением 632125 в JavaScript? ### Response: let weight = 632125;
86,055,432
en
C#
logic_ops
intermediate
Write logic to check if the year 1906 is a leap year in C#.
public bool IsLeap() { int y = 1906; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1906 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1906; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,252,275
en
Python
logic_ops
advanced
Write a function that determines if the number 173 is prime in Python.
def is_prime(): n = 173 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 173 is prime in Python. ### Response: def is_prime(): n = 173 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
47,680,757
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); }
17,939,899
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); }
94,640,432
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; }
2,686,817
kk
C#
var_decl
beginner
C# тілінде 555742 мәнімен total айнымалысын қалай жариялауға болады?
int total = 555742;
### Instruction: C# тілінде 555742 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 555742;
89,727,368
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); }
538,056
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 767.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(767) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 767. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(767) << std::endl;
77,302,977
kk
C#
logic_ops
advanced
C# тилінде 2062 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2062 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,269,493
kk
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); }
19,178,747
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1996 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1996; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1996 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1996; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,894,524
kk
JavaScript
var_decl
beginner
JavaScript тілінде 373325 мәнімен level айнымалысын қалай жариялауға болады?
let level = 373325;
### Instruction: JavaScript тілінде 373325 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 373325;
95,787,775
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; }
36,788,429
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
3,840,779
ru
C#
var_decl
beginner
Как объявить переменную score со значением 618248 в C#?
int score = 618248;
### Instruction: Как объявить переменную score со значением 618248 в C#? ### Response: int score = 618248;
85,804,649
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); }
12,714,302
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
4,988,141
kk
Python
var_decl
beginner
Python тілінде 346528 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 346528
### Instruction: Python тілінде 346528 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 346528
73,288,006
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; }
87,643,105
kk
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; }
64,427,532
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();
417,958
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 7980.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7980) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 7980. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7980) << std::endl;
4,739,565
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 421357 в JavaScript?
let timer = 421357;
### Instruction: Как объявить переменную timer со значением 421357 в JavaScript? ### Response: let timer = 421357;
15,105,226
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2054 високосным.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2054 високосным. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,243,808
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); }
98,041,342
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; }
4,615,688
en
C++
var_decl
beginner
How to declare a variable rate with value 953843 in C++?
int rate = 953843;
### Instruction: How to declare a variable rate with value 953843 in C++? ### Response: int rate = 953843;
393,994
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4666.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4666));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 4666. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4666));
59,203,846
kk
Java
logic_ops
intermediate
Java тилінде 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: Java тилінде 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; }
13,715,483
en
Python
logic_ops
intermediate
Write a function that determines if the number 36 is prime in Python.
def is_prime(): n = 36 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 36 is prime in Python. ### Response: def is_prime(): n = 36 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
27,048,402
en
Unity
string_ops
advanced
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; }
43,379,095
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,942,737
kk
JavaScript
var_decl
beginner
JavaScript тілінде 829233 мәнімен rate айнымалысын қалай жариялауға болады?
let rate = 829233;
### Instruction: JavaScript тілінде 829233 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: let rate = 829233;
41,840,400
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
26,558,227
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); }
47,901
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 9647.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9647));
### Instruction: Write a function in C# that calculates the factorial of 9647. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9647));
3,526,531
kk
Unity
var_decl
beginner
Unity тілінде 544539 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 544539;
### Instruction: Unity тілінде 544539 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 544539;
38,368,322
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; }
1,403,503
kk
C#
var_decl
beginner
C# тілінде 957383 мәнімен data айнымалысын қалай жариялауға болады?
int data = 957383;
### Instruction: C# тілінде 957383 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 957383;
267,735
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 1841.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1841));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 1841. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1841));
303,096
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 292951 в JavaScript?
let index = 292951;
### Instruction: Как объявить переменную index со значением 292951 в JavaScript? ### Response: let index = 292951;
70,547,841
kk
C#
logic_ops
advanced
C# тилінде 463 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 463; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 463 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 463; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
52,124,655
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;
1,729,570
en
Java
var_decl
beginner
How to declare a variable total with value 743245 in Java?
int total = 743245;
### Instruction: How to declare a variable total with value 743245 in Java? ### Response: int total = 743245;
91,888,804
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; }
39,401,212
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 175 is prime in JavaScript.
function isPrime() { let n = 175; 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 175 is prime in JavaScript. ### Response: function isPrime() { let n = 175; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }