id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
80,674,802
en
C#
logic_ops
advanced
Write a function that determines if the number 126 is prime in C#.
public bool IsPrime() { int n = 126; 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 126 is prime in C#. ### Response: public bool IsPrime() { int n = 126; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,316,080
en
Unity
var_decl
beginner
How to declare a variable result with value 74958 in Unity?
int result = 74958;
### Instruction: How to declare a variable result with value 74958 in Unity? ### Response: int result = 74958;
212,882
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 7502.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7502) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 7502. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7502) << std::endl;
27,488,100
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; }
648,865
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 4666.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4666) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 4666. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(4666) << std::endl;
50,716,264
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
2,754
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 598927 in JavaScript?
let offset = 598927;
### Instruction: How to declare a variable offset with value 598927 in JavaScript? ### Response: let offset = 598927;
93,342,306
kk
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; }
75,233,963
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; }
85,501
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 2871.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2871) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 2871. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2871) << std::endl;
29,169,116
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; }
239,500
kk
C#
sum_n
intermediate
C# тілінде 1-ден 218-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(218));
### Instruction: C# тілінде 1-ден 218-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(218));
26,313,803
kk
Java
logic_ops
advanced
Java тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2089 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
28,211,614
en
Java
logic_ops
intermediate
Write a function that determines if the number 69 is prime in Java.
public bool IsPrime() { int n = 69; 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 69 is prime in Java. ### Response: public bool IsPrime() { int n = 69; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,126,522
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; }
3,239,945
kk
Unity
var_decl
beginner
Unity тілінде 623179 мәнімен count айнымалысын қалай жариялауға болады?
int count = 623179;
### Instruction: Unity тілінде 623179 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 623179;
929,169
kk
Unity
var_decl
beginner
Unity тілінде 33794 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 33794;
### Instruction: Unity тілінде 33794 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 33794;
28,175,205
en
Unity
logic_ops
advanced
Write a function that determines if the number 349 is prime in Unity.
public bool IsPrime() { int n = 349; 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 349 is prime in Unity. ### Response: public bool IsPrime() { int n = 349; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
38,757,063
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 215 простым.
public bool IsPrime() { int n = 215; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 215 простым. ### Response: public bool IsPrime() { int n = 215; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
70,444,624
kk
Java
string_ops
intermediate
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
96,088,191
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)
3,458,228
ru
Python
var_decl
beginner
Как объявить переменную offset со значением 421996 в Python?
offset = 421996
### Instruction: Как объявить переменную offset со значением 421996 в Python? ### Response: offset = 421996
2,462,793
kk
Python
var_decl
beginner
Python тілінде 980186 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 980186
### Instruction: Python тілінде 980186 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 980186
572,321
en
Python
var_decl
beginner
How to declare a variable score with value 994855 in Python?
score = 994855
### Instruction: How to declare a variable score with value 994855 in Python? ### Response: score = 994855
4,889
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 5513.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5513));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 5513. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5513));
31,086
en
Unity
var_decl
beginner
How to declare a variable y with value 854153 in Unity?
int y = 854153;
### Instruction: How to declare a variable y with value 854153 in Unity? ### Response: int y = 854153;
50,868,887
en
Unity
logic_ops
advanced
Write logic to check if the year 1945 is a leap year in Unity.
public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1945 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1945; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,425,766
en
Python
var_decl
beginner
How to declare a variable result with value 208840 in Python?
result = 208840
### Instruction: How to declare a variable result with value 208840 in Python? ### Response: result = 208840
41,420,491
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аеёиоуыэюя')
2,622,370
en
C#
var_decl
beginner
How to declare a variable index with value 494371 in C#?
int index = 494371;
### Instruction: How to declare a variable index with value 494371 in C#? ### Response: int index = 494371;
81,726,085
ru
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); }
195,705
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 8278.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8278))
### Instruction: Write a function in Python that calculates the factorial of 8278. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8278))
220,022
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5868.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5868)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5868. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5868)); }
10,455,220
en
Unity
array_ops
advanced
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; }
519,386
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 57.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(57))
### Instruction: Write a function in Python that calculates the factorial of 57. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(57))
64,357,862
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1913 високосным.
def is_leap(): year = 1913 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1913 високосным. ### Response: def is_leap(): year = 1913 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,574,027
ru
Java
var_decl
beginner
Как объявить переменную result со значением 507840 в Java?
int result = 507840;
### Instruction: Как объявить переменную result со значением 507840 в Java? ### Response: int result = 507840;
90,277,687
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
99,736,011
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
29,374,102
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(); }
45,751,724
kk
Java
logic_ops
intermediate
Java тилінде 32 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 32; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 32 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 32; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
34,070,142
kk
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; }
88,057,193
kk
C++
logic_ops
intermediate
C++ тилінде 165 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 165; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 165 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 165; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
11,030,835
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
79,627,689
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;
22,189,924
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; }
938,859
en
Java
var_decl
beginner
How to declare a variable total with value 255437 in Java?
int total = 255437;
### Instruction: How to declare a variable total with value 255437 in Java? ### Response: int total = 255437;
880,980
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 9427-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9427)); }
### Instruction: Unity тілінде 1-ден 9427-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(9427)); }
18,105,251
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)
3,969,805
en
C#
var_decl
beginner
How to declare a variable score with value 362333 in C#?
int score = 362333;
### Instruction: How to declare a variable score with value 362333 in C#? ### Response: int score = 362333;
17,862,386
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; }
1,484,011
en
JavaScript
var_decl
beginner
How to declare a variable index with value 728716 in JavaScript?
let index = 728716;
### Instruction: How to declare a variable index with value 728716 in JavaScript? ### Response: let index = 728716;
271,544
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 2869.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2869)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 2869. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2869)); }
12,441,031
ru
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); }
67,071,996
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; }
89,138,323
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(); }
90,215,420
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); }
38,759
kk
Unity
factorial
advanced
Unity тілінде 5266 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5266)); }
### Instruction: Unity тілінде 5266 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5266)); }
27,026,330
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
3,319,411
ru
JavaScript
var_decl
beginner
Как объявить переменную speed со значением 54178 в JavaScript?
let speed = 54178;
### Instruction: Как объявить переменную speed со значением 54178 в JavaScript? ### Response: let speed = 54178;
70,194,662
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]
36,508,191
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; }
46,612,985
kk
Python
logic_ops
intermediate
Python тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2004 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2004 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
63,371,762
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
73,999,693
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
47,868,907
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 298 простым.
public bool IsPrime() { int n = 298; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 298 простым. ### Response: public bool IsPrime() { int n = 298; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
65,940,565
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
4,677,981
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 235044 в Unity?
int rate = 235044;
### Instruction: Как объявить переменную rate со значением 235044 в Unity? ### Response: int rate = 235044;
3,147,474
kk
Java
var_decl
beginner
Java тілінде 265866 мәнімен value айнымалысын қалай жариялауға болады?
int value = 265866;
### Instruction: Java тілінде 265866 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 265866;
24,397,021
en
Python
logic_ops
advanced
Write logic to check if the year 2001 is a leap year in Python.
def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2001 is a leap year in Python. ### Response: def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
69,345,309
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 278 простым.
def is_prime(): n = 278 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 278 простым. ### Response: def is_prime(): n = 278 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,563,662
en
Java
var_decl
beginner
How to declare a variable total with value 983740 in Java?
int total = 983740;
### Instruction: How to declare a variable total with value 983740 in Java? ### Response: int total = 983740;
67,615,614
en
C#
logic_ops
intermediate
Write a function that determines if the number 3 is prime in C#.
public bool IsPrime() { int n = 3; 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 3 is prime in C#. ### Response: public bool IsPrime() { int n = 3; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
13,660,769
en
C#
logic_ops
advanced
Write logic to check if the year 2090 is a leap year in C#.
public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2090 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
238,634
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 6857-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6857)); }
### Instruction: Unity тілінде 1-ден 6857-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(6857)); }
4,614,956
en
Unity
var_decl
beginner
How to declare a variable score with value 635330 in Unity?
int score = 635330;
### Instruction: How to declare a variable score with value 635330 in Unity? ### Response: int score = 635330;
37,063,660
en
C#
array_ops
intermediate
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,072,846
kk
C++
var_decl
beginner
C++ тілінде 89328 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 89328;
### Instruction: C++ тілінде 89328 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 89328;
3,117,628
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 344733 в C++?
int timer = 344733;
### Instruction: Как объявить переменную timer со значением 344733 в C++? ### Response: int timer = 344733;
18,580,023
en
Unity
array_ops
intermediate
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
27,757,734
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('');
43,282
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 8681.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8681));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 8681. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8681));
2,379,762
kk
Unity
var_decl
beginner
Unity тілінде 199988 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 199988;
### Instruction: Unity тілінде 199988 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 199988;
52,936,077
kk
Unity
logic_ops
advanced
Unity тилінде 7 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 7; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 7 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 7; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,019,921
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 312932 в JavaScript?
let offset = 312932;
### Instruction: Как объявить переменную offset со значением 312932 в JavaScript? ### Response: let offset = 312932;
1,061,541
en
Java
var_decl
beginner
How to declare a variable amount with value 369368 in Java?
int amount = 369368;
### Instruction: How to declare a variable amount with value 369368 in Java? ### Response: int amount = 369368;
11,085,904
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
146,857
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 7272.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7272));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 7272. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7272));
1,013,315
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 989904 в JavaScript?
let size = 989904;
### Instruction: Как объявить переменную size со значением 989904 в JavaScript? ### Response: let size = 989904;
86,746,164
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; }
83,935,639
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
60,267,628
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
95,976,930
kk
Python
logic_ops
advanced
Python тилінде 1947 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1947 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1947 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1947 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,355,955
kk
Java
var_decl
beginner
Java тілінде 555808 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 555808;
### Instruction: Java тілінде 555808 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 555808;
2,578,632
en
C#
var_decl
beginner
How to declare a variable limit with value 169478 in C#?
int limit = 169478;
### Instruction: How to declare a variable limit with value 169478 in C#? ### Response: int limit = 169478;
88,463,273
en
Unity
logic_ops
intermediate
Write logic to check if the year 1929 is a leap year in Unity.
public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1929 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1929; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
395,512
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 997.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(997));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 997. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(997));
61,536,738
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2059 високосным.
public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2059 високосным. ### Response: public bool IsLeap() { int y = 2059; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
56,956,366
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
70,265,004
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2045 високосным.
public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2045 високосным. ### Response: public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }