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
3,751,370
en
C#
var_decl
beginner
How to declare a variable weight with value 225323 in C#?
int weight = 225323;
### Instruction: How to declare a variable weight with value 225323 in C#? ### Response: int weight = 225323;
14,781,537
ru
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,609,522
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; }
81,658,059
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
63,925,341
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; }
3,044,818
en
Unity
var_decl
beginner
How to declare a variable value with value 978571 in Unity?
int value = 978571;
### Instruction: How to declare a variable value with value 978571 in Unity? ### Response: int value = 978571;
57,112,226
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
4,279,429
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 698492 в JavaScript?
let limit = 698492;
### Instruction: Как объявить переменную limit со значением 698492 в JavaScript? ### Response: let limit = 698492;
97,772,057
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; }
61,243,381
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; }
91,492,034
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; }
51,509,244
kk
C#
array_ops
advanced
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
37,749,959
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
1,355,021
ru
C#
var_decl
beginner
Как объявить переменную size со значением 230184 в C#?
int size = 230184;
### Instruction: Как объявить переменную size со значением 230184 в C#? ### Response: int size = 230184;
31,491,433
en
Java
logic_ops
intermediate
Write logic to check if the year 1917 is a leap year in Java.
public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1917 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
79,745,948
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
171,993
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 5717.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5717));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 5717. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5717));
1,485,453
en
C++
var_decl
beginner
How to declare a variable x with value 367359 in C++?
int x = 367359;
### Instruction: How to declare a variable x with value 367359 in C++? ### Response: int x = 367359;
55,364,165
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(); }
775,762
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 3097.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3097) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 3097. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3097) << std::endl;
4,000,501
en
C++
var_decl
beginner
How to declare a variable level with value 3304 in C++?
int level = 3304;
### Instruction: How to declare a variable level with value 3304 in C++? ### Response: int level = 3304;
25,910,928
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2019 високосным.
public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2019 високосным. ### Response: public bool IsLeap() { int y = 2019; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
34,387,660
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); }
46,192,435
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,437,322
kk
Unity
var_decl
beginner
Unity тілінде 848063 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 848063;
### Instruction: Unity тілінде 848063 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 848063;
2,868,320
kk
C++
var_decl
beginner
C++ тілінде 741812 мәнімен value айнымалысын қалай жариялауға болады?
int value = 741812;
### Instruction: C++ тілінде 741812 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 741812;
15,029,915
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; }
3,774,373
en
Python
var_decl
beginner
How to declare a variable size with value 815713 in Python?
size = 815713
### Instruction: How to declare a variable size with value 815713 in Python? ### Response: size = 815713
34,768,801
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,628,495
en
Python
var_decl
beginner
How to declare a variable offset with value 494421 in Python?
offset = 494421
### Instruction: How to declare a variable offset with value 494421 in Python? ### Response: offset = 494421
20,754,026
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 12 is prime in JavaScript.
function isPrime() { let n = 12; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 12 is prime in JavaScript. ### Response: function isPrime() { let n = 12; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
20,512,909
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; }
3,054,748
en
C#
var_decl
beginner
How to declare a variable score with value 324984 in C#?
int score = 324984;
### Instruction: How to declare a variable score with value 324984 in C#? ### Response: int score = 324984;
896,211
ru
Java
var_decl
beginner
Как объявить переменную weight со значением 618286 в Java?
int weight = 618286;
### Instruction: Как объявить переменную weight со значением 618286 в Java? ### Response: int weight = 618286;
84,973,789
ru
Python
string_ops
advanced
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
25,035,129
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 157 простым.
public bool IsPrime() { int n = 157; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 157 простым. ### Response: public bool IsPrime() { int n = 157; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
32,728,529
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); }
4,251,984
kk
JavaScript
var_decl
beginner
JavaScript тілінде 273034 мәнімен data айнымалысын қалай жариялауға болады?
let data = 273034;
### Instruction: JavaScript тілінде 273034 мәнімен data айнымалысын қалай жариялауға болады? ### Response: let data = 273034;
4,083,243
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 378240 в Unity?
int speed = 378240;
### Instruction: Как объявить переменную speed со значением 378240 в Unity? ### Response: int speed = 378240;
26,172,839
en
Unity
logic_ops
advanced
Write logic to check if the year 1922 is a leap year in Unity.
public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1922 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
68,610,678
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]
4,164,135
ru
Java
var_decl
beginner
Как объявить переменную count со значением 709053 в Java?
int count = 709053;
### Instruction: Как объявить переменную count со значением 709053 в Java? ### Response: int count = 709053;
71,022,200
ru
Java
array_ops
advanced
Напишите на Java функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Java функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
35,589,530
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; }
3,198,257
kk
Unity
var_decl
beginner
Unity тілінде 501452 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 501452;
### Instruction: Unity тілінде 501452 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 501452;
64,304,105
en
C#
logic_ops
advanced
Write a function that determines if the number 383 is prime in C#.
public bool IsPrime() { int n = 383; 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 383 is prime in C#. ### Response: public bool IsPrime() { int n = 383; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
54,899,573
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
924,140
kk
Java
var_decl
beginner
Java тілінде 101052 мәнімен size айнымалысын қалай жариялауға болады?
int size = 101052;
### Instruction: Java тілінде 101052 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 101052;
4,018,982
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 167448 в C++?
int buffer = 167448;
### Instruction: Как объявить переменную buffer со значением 167448 в C++? ### Response: int buffer = 167448;
88,748,047
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
1,735,299
kk
Java
var_decl
beginner
Java тілінде 726721 мәнімен index айнымалысын қалай жариялауға болады?
int index = 726721;
### Instruction: Java тілінде 726721 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 726721;
4,851,978
en
Java
var_decl
beginner
How to declare a variable limit with value 543164 in Java?
int limit = 543164;
### Instruction: How to declare a variable limit with value 543164 in Java? ### Response: int limit = 543164;
89,413,782
kk
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аеёиоуыэюя')
128,346
kk
JavaScript
var_decl
beginner
JavaScript тілінде 194564 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 194564;
### Instruction: JavaScript тілінде 194564 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 194564;
16,270,955
en
C#
logic_ops
intermediate
Write a function that determines if the number 68 is prime in C#.
public bool IsPrime() { int n = 68; 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 68 is prime in C#. ### Response: public bool IsPrime() { int n = 68; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
65,669,382
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; }
63,880,448
kk
C#
logic_ops
advanced
C# тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2039; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2039; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
83,785,137
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
87,358,718
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); }
39,034,446
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; }
58,414,261
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('');
432,133
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 2718.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2718));
### Instruction: Write a function in C# that sums numbers from 1 to 2718. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2718));
81,619
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 4909-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4909)); }
### Instruction: Unity тілінде 1-ден 4909-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(4909)); }
71,536,876
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2037 високосным.
function isLeap() { let y = 2037; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2037 високосным. ### Response: function isLeap() { let y = 2037; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,940,643
kk
C++
var_decl
beginner
C++ тілінде 997546 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 997546;
### Instruction: C++ тілінде 997546 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 997546;
74,568,664
ru
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; }
69,197,681
en
C++
logic_ops
intermediate
Write logic to check if the year 1950 is a leap year in C++.
public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1950 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1950; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
50,024,043
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]
61,093,083
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); }
58,365,507
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2032 високосным.
def is_leap(): year = 2032 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2032 високосным. ### Response: def is_leap(): year = 2032 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,006,609
kk
Unity
var_decl
beginner
Unity тілінде 45058 мәнімен score айнымалысын қалай жариялауға болады?
int score = 45058;
### Instruction: Unity тілінде 45058 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 45058;
4,263,153
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 181246 в Unity?
int buffer = 181246;
### Instruction: Как объявить переменную buffer со значением 181246 в Unity? ### Response: int buffer = 181246;
56,753,533
kk
Java
string_ops
intermediate
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
2,572,843
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 618226 в JavaScript?
let count = 618226;
### Instruction: Как объявить переменную count со значением 618226 в JavaScript? ### Response: let count = 618226;
3,920,552
ru
Python
var_decl
beginner
Как объявить переменную count со значением 363912 в Python?
count = 363912
### Instruction: Как объявить переменную count со значением 363912 в Python? ### Response: count = 363912
4,972,177
en
Unity
var_decl
beginner
How to declare a variable level with value 295713 in Unity?
int level = 295713;
### Instruction: How to declare a variable level with value 295713 in Unity? ### Response: int level = 295713;
43,293,428
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
1,181,866
en
Java
var_decl
beginner
How to declare a variable result with value 584810 in Java?
int result = 584810;
### Instruction: How to declare a variable result with value 584810 in Java? ### Response: int result = 584810;
138,500
ru
C#
var_decl
beginner
Как объявить переменную result со значением 186136 в C#?
int result = 186136;
### Instruction: Как объявить переменную result со значением 186136 в C#? ### Response: int result = 186136;
37,599,726
en
Java
array_ops
advanced
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; }
2,826,555
kk
Java
var_decl
beginner
Java тілінде 942773 мәнімен y айнымалысын қалай жариялауға болады?
int y = 942773;
### Instruction: Java тілінде 942773 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 942773;
83,400,711
kk
C++
string_ops
advanced
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
65,251,646
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
89,567,798
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; }
2,275,505
en
Python
var_decl
beginner
How to declare a variable buffer with value 241039 in Python?
buffer = 241039
### Instruction: How to declare a variable buffer with value 241039 in Python? ### Response: buffer = 241039
2,472,098
kk
Java
var_decl
beginner
Java тілінде 276732 мәнімен x айнымалысын қалай жариялауға болады?
int x = 276732;
### Instruction: Java тілінде 276732 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 276732;
43,691,030
en
C++
string_ops
advanced
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
39,582,566
ru
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; }
57,330,359
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; }
480,862
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 9207.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9207));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 9207. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9207));
32,421,816
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(); }
3,224,846
kk
Unity
var_decl
beginner
Unity тілінде 751804 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 751804;
### Instruction: Unity тілінде 751804 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 751804;
3,913,810
kk
C++
var_decl
beginner
C++ тілінде 588021 мәнімен y айнымалысын қалай жариялауға болады?
int y = 588021;
### Instruction: C++ тілінде 588021 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 588021;
93,761,415
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; }
2,057,049
en
Java
var_decl
beginner
How to declare a variable timer with value 938075 in Java?
int timer = 938075;
### Instruction: How to declare a variable timer with value 938075 in Java? ### Response: int timer = 938075;
2,388,426
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 711607 в C++?
int offset = 711607;
### Instruction: Как объявить переменную offset со значением 711607 в C++? ### Response: int offset = 711607;
1,873,987
kk
Python
var_decl
beginner
Python тілінде 362408 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 362408
### Instruction: Python тілінде 362408 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 362408
2,989,514
kk
Unity
var_decl
beginner
Unity тілінде 663433 мәнімен count айнымалысын қалай жариялауға болады?
int count = 663433;
### Instruction: Unity тілінде 663433 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 663433;
141,903
kk
C++
factorial
advanced
C++ тілінде 28 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(28) << std::endl;
### Instruction: C++ тілінде 28 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(28) << std::endl;
60,970,127
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 301 простым.
public bool IsPrime() { int n = 301; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 301 простым. ### Response: public bool IsPrime() { int n = 301; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }