id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
4,212,098
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 97386 в JavaScript?
let offset = 97386;
### Instruction: Как объявить переменную offset со значением 97386 в JavaScript? ### Response: let offset = 97386;
1,104,015
en
Java
var_decl
beginner
How to declare a variable count with value 362070 in Java?
int count = 362070;
### Instruction: How to declare a variable count with value 362070 in Java? ### Response: int count = 362070;
4,681,406
kk
C#
var_decl
beginner
C# тілінде 255517 мәнімен score айнымалысын қалай жариялауға болады?
int score = 255517;
### Instruction: C# тілінде 255517 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 255517;
83,387,842
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; }
29,338,991
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
70,501,060
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
89,443
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 895.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(895));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 895. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(895));
65,760,910
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
272,347
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 2760.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2760) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 2760. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2760) << std::endl;
43,375,680
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
2,059,479
en
Java
var_decl
beginner
How to declare a variable index with value 248839 in Java?
int index = 248839;
### Instruction: How to declare a variable index with value 248839 in Java? ### Response: int index = 248839;
571,409
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 6930.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6930))
### Instruction: Write a function in Python that sums numbers from 1 to 6930. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(6930))
2,875,771
en
Unity
var_decl
beginner
How to declare a variable score with value 385246 in Unity?
int score = 385246;
### Instruction: How to declare a variable score with value 385246 in Unity? ### Response: int score = 385246;
2,590,532
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 323202 в Unity?
int result = 323202;
### Instruction: Как объявить переменную result со значением 323202 в Unity? ### Response: int result = 323202;
1,081,002
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 665019 в Java?
int speed = 665019;
### Instruction: Как объявить переменную speed со значением 665019 в Java? ### Response: int speed = 665019;
4,654,107
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 324869 в C#?
int amount = 324869;
### Instruction: Как объявить переменную amount со значением 324869 в C#? ### Response: int amount = 324869;
12,233,208
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 483 простым.
public bool IsPrime() { int n = 483; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 483 простым. ### Response: public bool IsPrime() { int n = 483; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,210,666
en
Unity
var_decl
beginner
How to declare a variable buffer with value 682420 in Unity?
int buffer = 682420;
### Instruction: How to declare a variable buffer with value 682420 in Unity? ### Response: int buffer = 682420;
3,013,278
en
JavaScript
var_decl
beginner
How to declare a variable x with value 757528 in JavaScript?
let x = 757528;
### Instruction: How to declare a variable x with value 757528 in JavaScript? ### Response: let x = 757528;
93,457,078
kk
Unity
logic_ops
advanced
Unity тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2045; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,843,057
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); }
77,463,210
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
357,978
ru
C#
var_decl
beginner
Как объявить переменную index со значением 59874 в C#?
int index = 59874;
### Instruction: Как объявить переменную index со значением 59874 в C#? ### Response: int index = 59874;
25,015,717
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
2,851,789
en
C#
var_decl
beginner
How to declare a variable rate with value 957676 in C#?
int rate = 957676;
### Instruction: How to declare a variable rate with value 957676 in C#? ### Response: int rate = 957676;
667,161
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 4862.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(4862) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 4862. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(4862) << std::endl;
58,378,048
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); }
2,869,664
kk
JavaScript
var_decl
beginner
JavaScript тілінде 212752 мәнімен level айнымалысын қалай жариялауға болады?
let level = 212752;
### Instruction: JavaScript тілінде 212752 мәнімен level айнымалысын қалай жариялауға болады? ### Response: let level = 212752;
44,727,206
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; }
378,834
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 2453.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2453));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 2453. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2453));
2,778,142
ru
Python
var_decl
beginner
Как объявить переменную size со значением 80114 в Python?
size = 80114
### Instruction: Как объявить переменную size со значением 80114 в Python? ### Response: size = 80114
12,433,742
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; }
1,418,654
en
Java
var_decl
beginner
How to declare a variable result with value 984856 in Java?
int result = 984856;
### Instruction: How to declare a variable result with value 984856 in Java? ### Response: int result = 984856;
86,209,772
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; }
44,659,538
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,026,748
kk
C++
var_decl
beginner
C++ тілінде 305100 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 305100;
### Instruction: C++ тілінде 305100 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 305100;
53,973,078
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); }
28,559,893
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]
216,110
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 3017.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(3017) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 3017. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(3017) << std::endl;
80,235,955
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]
373,579
kk
C#
sum_n
intermediate
C# тілінде 1-ден 596-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(596));
### Instruction: C# тілінде 1-ден 596-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(596));
79,725,204
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
30,010,130
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; }
72,158,467
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
54,395,649
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
13,352,031
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
11,751,782
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 382 простым.
function isPrime() { let n = 382; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 382 простым. ### Response: function isPrime() { let n = 382; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
648,327
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 699001 в Unity?
int amount = 699001;
### Instruction: Как объявить переменную amount со значением 699001 в Unity? ### Response: int amount = 699001;
92,853,534
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();
2,407,598
en
C#
var_decl
beginner
How to declare a variable data with value 293959 in C#?
int data = 293959;
### Instruction: How to declare a variable data with value 293959 in C#? ### Response: int data = 293959;
2,981,217
en
Unity
var_decl
beginner
How to declare a variable value with value 543169 in Unity?
int value = 543169;
### Instruction: How to declare a variable value with value 543169 in Unity? ### Response: int value = 543169;
66,703,201
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; }
82,301,095
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; }
161,820
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 2656-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(2656) << std::endl;
### Instruction: C++ тілінде 1-ден 2656-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int sum_to_n(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } std::cout << sum_to_n(2656) << std::endl;
65,644,923
kk
Java
logic_ops
intermediate
Java тилінде 1940 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1940 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1940; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,967,264
kk
Unity
var_decl
beginner
Unity тілінде 719457 мәнімен level айнымалысын қалай жариялауға болады?
int level = 719457;
### Instruction: Unity тілінде 719457 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 719457;
54,329,456
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; }
88,635,412
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1976 високосным.
public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1976 високосным. ### Response: public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
20,214,465
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; }
2,631,791
ru
Python
var_decl
beginner
Как объявить переменную score со значением 210298 в Python?
score = 210298
### Instruction: Как объявить переменную score со значением 210298 в Python? ### Response: score = 210298
38,362,695
kk
Unity
string_ops
intermediate
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; }
51,389,375
kk
Java
logic_ops
intermediate
Java тилінде 224 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 224; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 224 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 224; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
62,594,768
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]
24,754,869
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
34,250,841
kk
Python
array_ops
advanced
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
63,305,616
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
86,401,746
ru
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; }
29,606,244
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);
69,002,428
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; }
236,844
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 9349.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9349));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 9349. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9349));
2,355,035
kk
C++
var_decl
beginner
C++ тілінде 798982 мәнімен total айнымалысын қалай жариялауға болады?
int total = 798982;
### Instruction: C++ тілінде 798982 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 798982;
92,091,780
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
95,978,001
en
Java
logic_ops
advanced
Write a function that determines if the number 278 is prime in Java.
public bool IsPrime() { int n = 278; 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 278 is prime in Java. ### Response: public bool IsPrime() { int n = 278; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,045,490
kk
C++
var_decl
beginner
C++ тілінде 797740 мәнімен value айнымалысын қалай жариялауға болады?
int value = 797740;
### Instruction: C++ тілінде 797740 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 797740;
63,919,245
kk
C#
array_ops
intermediate
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
286,411
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 6240.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6240));
### Instruction: Write a function in Java that sums numbers from 1 to 6240. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6240));
25,612,259
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; }
1,032,790
kk
Python
var_decl
beginner
Python тілінде 211746 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 211746
### Instruction: Python тілінде 211746 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 211746
817,465
kk
C#
factorial
advanced
C# тілінде 8643 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8643));
### Instruction: C# тілінде 8643 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8643));
18,064
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 1038.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1038));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 1038. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(1038));
15,035,501
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1929 високосным.
function isLeap() { let y = 1929; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1929 високосным. ### Response: function isLeap() { let y = 1929; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
98,195,998
kk
Python
logic_ops
intermediate
Python тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
2,709,873
en
C++
var_decl
beginner
How to declare a variable y with value 708622 in C++?
int y = 708622;
### Instruction: How to declare a variable y with value 708622 in C++? ### Response: int y = 708622;
538,417
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 4005.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4005))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 4005. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4005))
98,998,325
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; }
4,385,959
kk
JavaScript
var_decl
beginner
JavaScript тілінде 760914 мәнімен health айнымалысын қалай жариялауға болады?
let health = 760914;
### Instruction: JavaScript тілінде 760914 мәнімен health айнымалысын қалай жариялауға болады? ### Response: let health = 760914;
36,293,572
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
1,325,909
en
JavaScript
var_decl
beginner
How to declare a variable value with value 747710 in JavaScript?
let value = 747710;
### Instruction: How to declare a variable value with value 747710 in JavaScript? ### Response: let value = 747710;
3,333,048
kk
JavaScript
var_decl
beginner
JavaScript тілінде 513329 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 513329;
### Instruction: JavaScript тілінде 513329 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 513329;
41,519,678
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; }
4,407,629
kk
Java
var_decl
beginner
Java тілінде 358779 мәнімен health айнымалысын қалай жариялауға болады?
int health = 358779;
### Instruction: Java тілінде 358779 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 358779;
18,481
en
Unity
func_def
intermediate
Write a function resolve in Unity that takes count and doubles it.
int resolve(int count) { return count * 2; }
### Instruction: Write a function resolve in Unity that takes count and doubles it. ### Response: int resolve(int count) { return count * 2; }
28,726,290
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1991 високосным.
def is_leap(): year = 1991 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1991 високосным. ### Response: def is_leap(): year = 1991 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
72,950,508
en
JavaScript
array_ops
advanced
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();
57,022,425
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; }
50,276,230
kk
C++
logic_ops
intermediate
C++ тилінде 2010 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2010 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,322,707
ru
C#
var_decl
beginner
Как объявить переменную y со значением 15504 в C#?
int y = 15504;
### Instruction: Как объявить переменную y со значением 15504 в C#? ### Response: int y = 15504;
3,220,788
en
Python
var_decl
beginner
How to declare a variable timer with value 627480 in Python?
timer = 627480
### Instruction: How to declare a variable timer with value 627480 in Python? ### Response: timer = 627480
405,341
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 686.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(686));
### Instruction: Write a function in Java that sums numbers from 1 to 686. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(686));
55,654,975
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 375 простым.
public bool IsPrime() { int n = 375; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 375 простым. ### Response: public bool IsPrime() { int n = 375; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }