id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
97,292,478
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,957,536
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 593639 в Unity?
int level = 593639;
### Instruction: Как объявить переменную level со значением 593639 в Unity? ### Response: int level = 593639;
54,314,650
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
19,832,302
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; }
56,627,351
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; }
84,436,038
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2099 високосным.
public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2099 високосным. ### Response: public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
95,860,012
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
31,506,289
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1970 високосным.
function isLeap() { let y = 1970; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1970 високосным. ### Response: function isLeap() { let y = 1970; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
41,199,584
en
Python
string_ops
advanced
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()
1,209,017
kk
Unity
var_decl
beginner
Unity тілінде 185972 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 185972;
### Instruction: Unity тілінде 185972 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 185972;
13,583,801
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2068 високосным.
public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2068 високосным. ### Response: public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,156,611
en
C++
var_decl
beginner
How to declare a variable weight with value 913569 in C++?
int weight = 913569;
### Instruction: How to declare a variable weight with value 913569 in C++? ### Response: int weight = 913569;
3,857,490
en
C#
var_decl
beginner
How to declare a variable timer with value 454351 in C#?
int timer = 454351;
### Instruction: How to declare a variable timer with value 454351 in C#? ### Response: int timer = 454351;
4,867,042
en
JavaScript
var_decl
beginner
How to declare a variable index with value 381125 in JavaScript?
let index = 381125;
### Instruction: How to declare a variable index with value 381125 in JavaScript? ### Response: let index = 381125;
1,832,096
en
C#
var_decl
beginner
How to declare a variable timer with value 583275 in C#?
int timer = 583275;
### Instruction: How to declare a variable timer with value 583275 in C#? ### Response: int timer = 583275;
55,072,898
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2052 високосным.
def is_leap(): year = 2052 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2052 високосным. ### Response: def is_leap(): year = 2052 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
85,887,121
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(); }
72,200,320
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
33,304,427
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
22,778,791
en
Unity
logic_ops
intermediate
Write logic to check if the year 1930 is a leap year in Unity.
public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1930 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
60,946,577
kk
Python
logic_ops
intermediate
Python тилінде 2091 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2091 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2091 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2091 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
541,011
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 2247.
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(2247) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 2247. ### 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(2247) << std::endl;
345,048
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1729.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1729)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 1729. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1729)); }
60,835,389
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1981 високосным.
public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1981 високосным. ### Response: public bool IsLeap() { int y = 1981; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
57,004,119
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]
54,717,045
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]
4,940,268
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 881332 в JavaScript?
let timer = 881332;
### Instruction: Как объявить переменную timer со значением 881332 в JavaScript? ### Response: let timer = 881332;
52,618,587
kk
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; }
14,572,018
kk
Unity
array_ops
advanced
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; }
63,332,249
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,308,230
kk
JavaScript
var_decl
beginner
JavaScript тілінде 927327 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 927327;
### Instruction: JavaScript тілінде 927327 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 927327;
27,828,560
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; }
903,004
kk
JavaScript
var_decl
beginner
JavaScript тілінде 625751 мәнімен data айнымалысын қалай жариялауға болады?
let data = 625751;
### Instruction: JavaScript тілінде 625751 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 625751;
77,612,165
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
285,515
kk
Python
sum_n
intermediate
Python тілінде 1-ден 9034-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9034))
### Instruction: Python тілінде 1-ден 9034-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9034))
43,538,011
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('');
24,025,216
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
770,490
en
C#
var_decl
beginner
How to declare a variable x with value 731676 in C#?
int x = 731676;
### Instruction: How to declare a variable x with value 731676 in C#? ### Response: int x = 731676;
2,858,767
kk
Java
var_decl
beginner
Java тілінде 279286 мәнімен level айнымалысын қалай жариялауға болады?
int level = 279286;
### Instruction: Java тілінде 279286 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 279286;
99,381,628
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; }
145,673
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 4129-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4129));
### Instruction: JavaScript тілінде 1-ден 4129-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4129));
2,746,785
ru
C#
var_decl
beginner
Как объявить переменную offset со значением 878833 в C#?
int offset = 878833;
### Instruction: Как объявить переменную offset со значением 878833 в C#? ### Response: int offset = 878833;
74,777,243
kk
Java
logic_ops
advanced
Java тилінде 2096 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2096 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,064,941
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 839993 in JavaScript?
let amount = 839993;
### Instruction: How to declare a variable amount with value 839993 in JavaScript? ### Response: let amount = 839993;
23,980
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 8713-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8713)); }
### Instruction: Unity тілінде 1-ден 8713-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8713)); }
2,031,454
kk
Unity
var_decl
beginner
Unity тілінде 919209 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 919209;
### Instruction: Unity тілінде 919209 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 919209;
12,222,349
kk
Python
logic_ops
advanced
Python тилінде 26 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 26 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 26 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 26 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
41,797,512
kk
Unity
string_ops
intermediate
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; }
54,752,973
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(); }
1,340,909
kk
Java
var_decl
beginner
Java тілінде 727906 мәнімен data айнымалысын қалай жариялауға болады?
int data = 727906;
### Instruction: Java тілінде 727906 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 727906;
80,217,894
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; }
853,877
en
Python
var_decl
beginner
How to declare a variable weight with value 864038 in Python?
weight = 864038
### Instruction: How to declare a variable weight with value 864038 in Python? ### Response: weight = 864038
2,062,773
en
C#
var_decl
beginner
How to declare a variable total with value 118769 in C#?
int total = 118769;
### Instruction: How to declare a variable total with value 118769 in C#? ### Response: int total = 118769;
30,646,945
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 479 простым.
public bool IsPrime() { int n = 479; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 479 простым. ### Response: public bool IsPrime() { int n = 479; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,624,589
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
24,661,993
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 384 простым.
function isPrime() { let n = 384; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 384 простым. ### Response: function isPrime() { let n = 384; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
49,033,525
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 460 простым.
def is_prime(): n = 460 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 460 простым. ### Response: def is_prime(): n = 460 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
66,073,577
en
C#
logic_ops
intermediate
Write logic to check if the year 1941 is a leap year in C#.
public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1941 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
61,840,716
kk
C#
logic_ops
advanced
C# тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1939; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1939 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1939; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
837,028
kk
Unity
var_decl
beginner
Unity тілінде 785707 мәнімен data айнымалысын қалай жариялауға болады?
int data = 785707;
### Instruction: Unity тілінде 785707 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 785707;
3,855,422
kk
Java
var_decl
beginner
Java тілінде 362166 мәнімен value айнымалысын қалай жариялауға болады?
int value = 362166;
### Instruction: Java тілінде 362166 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 362166;
4,759,023
kk
C#
var_decl
beginner
C# тілінде 160432 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 160432;
### Instruction: C# тілінде 160432 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 160432;
53,577,202
kk
Unity
array_ops
advanced
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; }
56,515,693
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; }
351,690
kk
C++
var_decl
beginner
C++ тілінде 981974 мәнімен data айнымалысын қалай жариялауға болады?
int data = 981974;
### Instruction: C++ тілінде 981974 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 981974;
297,460
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 335.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(335));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 335. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(335));
803,592
en
Java
var_decl
beginner
How to declare a variable rate with value 477849 in Java?
int rate = 477849;
### Instruction: How to declare a variable rate with value 477849 in Java? ### Response: int rate = 477849;
65,905,280
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
16,306,356
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; }
778,037
ru
JavaScript
var_decl
beginner
Как объявить переменную value со значением 808814 в JavaScript?
let value = 808814;
### Instruction: Как объявить переменную value со значением 808814 в JavaScript? ### Response: let value = 808814;
1,820,576
ru
Java
var_decl
beginner
Как объявить переменную value со значением 160338 в Java?
int value = 160338;
### Instruction: Как объявить переменную value со значением 160338 в Java? ### Response: int value = 160338;
1,217,477
kk
Unity
var_decl
beginner
Unity тілінде 927670 мәнімен x айнымалысын қалай жариялауға болады?
int x = 927670;
### Instruction: Unity тілінде 927670 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 927670;
72,681,142
ru
Unity
string_ops
intermediate
Напишите на 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; }
4,894,648
ru
Java
var_decl
beginner
Как объявить переменную index со значением 279221 в Java?
int index = 279221;
### Instruction: Как объявить переменную index со значением 279221 в Java? ### Response: int index = 279221;
84,485,221
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; }
16,484,552
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; }
15,193,872
en
C#
array_ops
intermediate
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
51,933,175
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; }
2,070,222
kk
C++
var_decl
beginner
C++ тілінде 675916 мәнімен health айнымалысын қалай жариялауға болады?
int health = 675916;
### Instruction: C++ тілінде 675916 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 675916;
93,449,645
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
72,905,048
en
Python
array_ops
intermediate
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
43,268,071
kk
C#
logic_ops
intermediate
C# тилінде 2087 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2087 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2087; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
33,611,245
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); }
82,440,075
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
25,921,695
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]
84,577,711
kk
Java
array_ops
intermediate
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,139,747
kk
Python
var_decl
beginner
Python тілінде 718393 мәнімен score айнымалысын қалай жариялауға болады?
score = 718393
### Instruction: Python тілінде 718393 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 718393
23,367,105
kk
Python
logic_ops
advanced
Python тилінде 9 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 9 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 9 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 9 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,554,961
en
Unity
var_decl
beginner
How to declare a variable speed with value 647753 in Unity?
int speed = 647753;
### Instruction: How to declare a variable speed with value 647753 in Unity? ### Response: int speed = 647753;
3,895,380
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 672537 в JavaScript?
let count = 672537;
### Instruction: Как объявить переменную count со значением 672537 в JavaScript? ### Response: let count = 672537;
17,083,163
en
C#
logic_ops
intermediate
Write a function that determines if the number 398 is prime in C#.
public bool IsPrime() { int n = 398; 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 398 is prime in C#. ### Response: public bool IsPrime() { int n = 398; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
257,838
kk
Python
sum_n
intermediate
Python тілінде 1-ден 999-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(999))
### Instruction: Python тілінде 1-ден 999-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(999))
76,625,784
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
2,691,636
kk
Unity
var_decl
beginner
Unity тілінде 831458 мәнімен score айнымалысын қалай жариялауға болады?
int score = 831458;
### Instruction: Unity тілінде 831458 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 831458;
16,200,566
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,357,300
ru
C#
var_decl
beginner
Как объявить переменную total со значением 901930 в C#?
int total = 901930;
### Instruction: Как объявить переменную total со значением 901930 в C#? ### Response: int total = 901930;
57,442,546
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; }
35,033,918
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1920 is a leap year in JavaScript.
function isLeap() { let y = 1920; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1920 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1920; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,585,390
kk
Java
var_decl
beginner
Java тілінде 462626 мәнімен health айнымалысын қалай жариялауға болады?
int health = 462626;
### Instruction: Java тілінде 462626 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 462626;
2,884,871
kk
JavaScript
var_decl
beginner
JavaScript тілінде 687743 мәнімен result айнымалысын қалай жариялауға болады?
let result = 687743;
### Instruction: JavaScript тілінде 687743 мәнімен result айнымалысын қалай жариялауға болады? ### Response: let result = 687743;