id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
14,419,449
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 219 is prime in JavaScript.
function isPrime() { let n = 219; 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 219 is prime in JavaScript. ### Response: function isPrime() { let n = 219; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
14,684,186
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
1,964,827
kk
Java
var_decl
beginner
Java тілінде 672239 мәнімен health айнымалысын қалай жариялауға болады?
int health = 672239;
### Instruction: Java тілінде 672239 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 672239;
213,622
kk
Java
sum_n
intermediate
Java тілінде 1-ден 1091-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1091));
### Instruction: Java тілінде 1-ден 1091-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1091));
88,502,703
en
Python
array_ops
advanced
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]
18,113,922
kk
Java
string_ops
advanced
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
38,458,073
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(); }
55,780,164
kk
C++
string_ops
intermediate
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
61,745,088
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
96,888,494
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1937 високосным.
public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1937 високосным. ### Response: public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,742,843
kk
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); }
2,597,720
kk
Java
var_decl
beginner
Java тілінде 614920 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 614920;
### Instruction: Java тілінде 614920 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 614920;
88,203,968
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('');
35,801,075
en
Java
logic_ops
advanced
Write logic to check if the year 1986 is a leap year in Java.
public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1986 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1986; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,929,153
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; }
71,711,925
en
C#
logic_ops
intermediate
Write logic to check if the year 1955 is a leap year in C#.
public bool IsLeap() { int y = 1955; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1955 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1955; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
561,120
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 544029 in JavaScript?
let amount = 544029;
### Instruction: How to declare a variable amount with value 544029 in JavaScript? ### Response: let amount = 544029;
92,786,243
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
53,712,160
kk
Java
logic_ops
advanced
Java тилінде 196 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 196; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 196 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 196; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
477,672
kk
C#
var_decl
beginner
C# тілінде 987627 мәнімен level айнымалысын қалай жариялауға болады?
int level = 987627;
### Instruction: C# тілінде 987627 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 987627;
4,839,454
kk
JavaScript
var_decl
beginner
JavaScript тілінде 159199 мәнімен health айнымалысын қалай жариялауға болады?
let health = 159199;
### Instruction: JavaScript тілінде 159199 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 159199;
27,805,084
kk
Python
logic_ops
intermediate
Python тилінде 163 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 163 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 163 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 163 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,131,379
kk
Python
var_decl
beginner
Python тілінде 967399 мәнімен index айнымалысын қалай жариялауға болады?
index = 967399
### Instruction: Python тілінде 967399 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 967399
29,519,755
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); }
3,372,545
kk
C#
var_decl
beginner
C# тілінде 679184 мәнімен value айнымалысын қалай жариялауға болады?
int value = 679184;
### Instruction: C# тілінде 679184 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 679184;
19,100,509
ru
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); }
65,975,056
kk
Python
array_ops
intermediate
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
2,573,537
kk
Unity
var_decl
beginner
Unity тілінде 262297 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 262297;
### Instruction: Unity тілінде 262297 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 262297;
58,804,246
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1982 високосным.
public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1982 високосным. ### Response: public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
92,822,267
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
61,204,517
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(); }
537,179
en
JavaScript
var_decl
beginner
How to declare a variable result with value 939593 in JavaScript?
let result = 939593;
### Instruction: How to declare a variable result with value 939593 in JavaScript? ### Response: let result = 939593;
1,204,537
ru
Python
var_decl
beginner
Как объявить переменную x со значением 46675 в Python?
x = 46675
### Instruction: Как объявить переменную x со значением 46675 в Python? ### Response: x = 46675
3,437,577
kk
Java
var_decl
beginner
Java тілінде 6918 мәнімен y айнымалысын қалай жариялауға болады?
int y = 6918;
### Instruction: Java тілінде 6918 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 6918;
57,639,433
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
83,520,998
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2062 високосным.
public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2062 високосным. ### Response: public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,379,577
ru
C++
var_decl
beginner
Как объявить переменную value со значением 959110 в C++?
int value = 959110;
### Instruction: Как объявить переменную value со значением 959110 в C++? ### Response: int value = 959110;
1,156,965
en
Python
var_decl
beginner
How to declare a variable score with value 916560 in Python?
score = 916560
### Instruction: How to declare a variable score with value 916560 in Python? ### Response: score = 916560
28,668,345
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; }
89,369,062
ru
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; }
74,639,491
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('');
32,977,218
kk
C++
logic_ops
intermediate
C++ тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1982; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
77,737,359
kk
Java
logic_ops
intermediate
Java тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1937; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,052,225
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
96,098,330
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; }
293,004
kk
Python
factorial
advanced
Python тілінде 7348 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7348))
### Instruction: Python тілінде 7348 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7348))
83,287,414
en
Python
array_ops
intermediate
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,779,418
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
43,134,861
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,434,802
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 761777 in JavaScript?
let speed = 761777;
### Instruction: How to declare a variable speed with value 761777 in JavaScript? ### Response: let speed = 761777;
4,238,733
kk
C#
var_decl
beginner
C# тілінде 667443 мәнімен total айнымалысын қалай жариялауға болады?
int total = 667443;
### Instruction: C# тілінде 667443 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 667443;
64,565,293
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(); }
92,438,286
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
70,317,794
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; }
46,978,946
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
48,563,259
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; }
37,879,520
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; }
20,675,390
en
C++
string_ops
intermediate
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(); }
919,104
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3198-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3198)); }
### Instruction: Unity тілінде 1-ден 3198-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3198)); }
60,073,580
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
52,964,862
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,676,779
en
Java
var_decl
beginner
How to declare a variable result with value 74105 in Java?
int result = 74105;
### Instruction: How to declare a variable result with value 74105 in Java? ### Response: int result = 74105;
4,613,210
en
Python
var_decl
beginner
How to declare a variable amount with value 607828 in Python?
amount = 607828
### Instruction: How to declare a variable amount with value 607828 in Python? ### Response: amount = 607828
3,845,220
kk
Java
var_decl
beginner
Java тілінде 734340 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 734340;
### Instruction: Java тілінде 734340 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 734340;
95,667,860
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; }
77,031,423
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1965 високосным.
public bool IsLeap() { int y = 1965; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1965 високосным. ### Response: public bool IsLeap() { int y = 1965; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,116,432
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;
4,593,965
en
Unity
var_decl
beginner
How to declare a variable level with value 987332 in Unity?
int level = 987332;
### Instruction: How to declare a variable level with value 987332 in Unity? ### Response: int level = 987332;
4,774,645
kk
JavaScript
var_decl
beginner
JavaScript тілінде 270553 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 270553;
### Instruction: JavaScript тілінде 270553 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 270553;
2,230,076
kk
JavaScript
var_decl
beginner
JavaScript тілінде 37970 мәнімен count айнымалысын қалай жариялауға болады?
let count = 37970;
### Instruction: JavaScript тілінде 37970 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 37970;
99,978,980
en
C#
logic_ops
advanced
Write a function that determines if the number 65 is prime in C#.
public bool IsPrime() { int n = 65; 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 65 is prime in C#. ### Response: public bool IsPrime() { int n = 65; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,824,661
en
Java
var_decl
beginner
How to declare a variable amount with value 576387 in Java?
int amount = 576387;
### Instruction: How to declare a variable amount with value 576387 in Java? ### Response: int amount = 576387;
3,872,563
kk
Python
var_decl
beginner
Python тілінде 820 мәнімен total айнымалысын қалай жариялауға болады?
total = 820
### Instruction: Python тілінде 820 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 820
99,333,976
en
C++
logic_ops
advanced
Write logic to check if the year 2008 is a leap year in C++.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2008 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,166,158
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 963 в Java?
int amount = 963;
### Instruction: Как объявить переменную amount со значением 963 в Java? ### Response: int amount = 963;
68,080
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 1506-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1506));
### Instruction: JavaScript тілінде 1-ден 1506-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(1506));
12,549,642
en
C++
logic_ops
intermediate
Write a function that determines if the number 429 is prime in C++.
public bool IsPrime() { int n = 429; 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 429 is prime in C++. ### Response: public bool IsPrime() { int n = 429; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
73,288,063
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
184,753
kk
C#
sum_n
intermediate
C# тілінде 1-ден 5281-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5281));
### Instruction: C# тілінде 1-ден 5281-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(5281));
18,464,638
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
53,361,619
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 380 простым.
public bool IsPrime() { int n = 380; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 380 простым. ### Response: public bool IsPrime() { int n = 380; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
164,776
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 5731.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5731) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 5731. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5731) << std::endl;
2,676,586
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 630556 in JavaScript?
let weight = 630556;
### Instruction: How to declare a variable weight with value 630556 in JavaScript? ### Response: let weight = 630556;
77,499,288
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); }
1,844,729
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 408885 в C#?
int timer = 408885;
### Instruction: Как объявить переменную timer со значением 408885 в C#? ### Response: int timer = 408885;
68,246,104
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 317 простым.
public bool IsPrime() { int n = 317; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 317 простым. ### Response: public bool IsPrime() { int n = 317; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
81,193,162
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2052 високосным.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2052 високосным. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
62,506,049
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; }
69,151,675
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; }
393,917
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 471562 в JavaScript?
let size = 471562;
### Instruction: Как объявить переменную size со значением 471562 в JavaScript? ### Response: let size = 471562;
96,907,505
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
62,654,065
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; }
4,144,989
ru
Python
var_decl
beginner
Как объявить переменную size со значением 702311 в Python?
size = 702311
### Instruction: Как объявить переменную size со значением 702311 в Python? ### Response: size = 702311
11,849,298
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
83,612,763
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); }
65,904,557
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2024 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2024; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2024 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2024; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,445,414
en
Python
var_decl
beginner
How to declare a variable health with value 703425 in Python?
health = 703425
### Instruction: How to declare a variable health with value 703425 in Python? ### Response: health = 703425
758,190
en
Python
var_decl
beginner
How to declare a variable score with value 861169 in Python?
score = 861169
### Instruction: How to declare a variable score with value 861169 in Python? ### Response: score = 861169
41,257,650
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
45,496,243
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;