id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
82,477,505
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,230,059
en
C#
var_decl
beginner
How to declare a variable level with value 449743 in C#?
int level = 449743;
### Instruction: How to declare a variable level with value 449743 in C#? ### Response: int level = 449743;
35,678,742
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; }
72,458,816
en
C#
array_ops
advanced
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; }
96,841,457
en
Java
string_ops
intermediate
Write a function that checks if a string is a palindrome in Java.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Java. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
31,736,773
ru
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; }
45,146,152
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
57,680,588
en
C#
logic_ops
intermediate
Write logic to check if the year 2060 is a leap year in C#.
public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2060 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,228,116
ru
Java
var_decl
beginner
Как объявить переменную total со значением 259908 в Java?
int total = 259908;
### Instruction: Как объявить переменную total со значением 259908 в Java? ### Response: int total = 259908;
19,686,197
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
56,731,020
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2042 високосным.
public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2042 високосным. ### Response: public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
95,599,119
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,018,007
en
JavaScript
var_decl
beginner
How to declare a variable score with value 965127 in JavaScript?
let score = 965127;
### Instruction: How to declare a variable score with value 965127 in JavaScript? ### Response: let score = 965127;
4,179,663
en
Python
var_decl
beginner
How to declare a variable count with value 167441 in Python?
count = 167441
### Instruction: How to declare a variable count with value 167441 in Python? ### Response: count = 167441
1,877,403
kk
Unity
var_decl
beginner
Unity тілінде 492527 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 492527;
### Instruction: Unity тілінде 492527 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 492527;
563,438
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 5968.
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(5968) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 5968. ### 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(5968) << std::endl;
15,068,416
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(); }
76,209,291
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; }
92,490,276
kk
Python
array_ops
advanced
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]
1,777,925
en
C#
var_decl
beginner
How to declare a variable speed with value 240298 in C#?
int speed = 240298;
### Instruction: How to declare a variable speed with value 240298 in C#? ### Response: int speed = 240298;
2,533,761
kk
Unity
var_decl
beginner
Unity тілінде 809356 мәнімен health айнымалысын қалай жариялауға болады?
int health = 809356;
### Instruction: Unity тілінде 809356 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 809356;
22,494,165
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1979 високосным.
public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1979 високосным. ### Response: public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
74,939,501
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; }
39,916,932
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(); }
67,221,655
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
614,278
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 2825.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2825));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 2825. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2825));
14,952,570
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; }
4,854,356
ru
Java
var_decl
beginner
Как объявить переменную health со значением 190698 в Java?
int health = 190698;
### Instruction: Как объявить переменную health со значением 190698 в Java? ### Response: int health = 190698;
4,170,890
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 131837 в C#?
int buffer = 131837;
### Instruction: Как объявить переменную buffer со значением 131837 в C#? ### Response: int buffer = 131837;
49,195,462
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 164 простым.
public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 164 простым. ### Response: public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
228,377
en
C#
var_decl
beginner
How to declare a variable level with value 735682 in C#?
int level = 735682;
### Instruction: How to declare a variable level with value 735682 in C#? ### Response: int level = 735682;
31,309,669
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); }
34,597,044
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); }
86,581,290
en
C++
logic_ops
intermediate
Write logic to check if the year 2005 is a leap year in C++.
public bool IsLeap() { int y = 2005; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2005 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2005; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
75,325,960
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; }
3,863,813
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 786872 in JavaScript?
let limit = 786872;
### Instruction: How to declare a variable limit with value 786872 in JavaScript? ### Response: let limit = 786872;
83,565,417
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; }
15,030,548
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1914 високосным.
public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1914 високосным. ### Response: public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
54,552,879
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; }
74,434,166
kk
C++
logic_ops
intermediate
C++ тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 30; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 30; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,666,861
en
Unity
var_decl
beginner
How to declare a variable amount with value 960702 in Unity?
int amount = 960702;
### Instruction: How to declare a variable amount with value 960702 in Unity? ### Response: int amount = 960702;
86,925,302
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);
280,647
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 3331.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3331))
### Instruction: Write a function in Python that sums numbers from 1 to 3331. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(3331))
1,747,234
ru
C++
var_decl
beginner
Как объявить переменную size со значением 558799 в C++?
int size = 558799;
### Instruction: Как объявить переменную size со значением 558799 в C++? ### Response: int size = 558799;
2,774,759
en
Java
var_decl
beginner
How to declare a variable limit with value 422246 in Java?
int limit = 422246;
### Instruction: How to declare a variable limit with value 422246 in Java? ### Response: int limit = 422246;
81,139,045
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); }
1,463,701
kk
C#
var_decl
beginner
C# тілінде 844906 мәнімен size айнымалысын қалай жариялауға болады?
int size = 844906;
### Instruction: C# тілінде 844906 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 844906;
1,170,524
kk
Unity
var_decl
beginner
Unity тілінде 882678 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 882678;
### Instruction: Unity тілінде 882678 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 882678;
58,518,618
en
Unity
array_ops
advanced
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); }
286,549
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 1389.
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(1389) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 1389. ### 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(1389) << std::endl;
54,431,329
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,820,046
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 220266 в JavaScript?
let y = 220266;
### Instruction: Как объявить переменную y со значением 220266 в JavaScript? ### Response: let y = 220266;
80,502,853
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; }
97,400,076
kk
Java
string_ops
advanced
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,767,461
ru
Unity
var_decl
beginner
Как объявить переменную value со значением 176307 в Unity?
int value = 176307;
### Instruction: Как объявить переменную value со значением 176307 в Unity? ### Response: int value = 176307;
1,957,057
kk
Unity
var_decl
beginner
Unity тілінде 438676 мәнімен total айнымалысын қалай жариялауға болады?
int total = 438676;
### Instruction: Unity тілінде 438676 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 438676;
4,874,474
en
Java
var_decl
beginner
How to declare a variable score with value 786890 in Java?
int score = 786890;
### Instruction: How to declare a variable score with value 786890 in Java? ### Response: int score = 786890;
42,222,614
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
15,085,566
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
2,748,302
en
C#
var_decl
beginner
How to declare a variable level with value 945963 in C#?
int level = 945963;
### Instruction: How to declare a variable level with value 945963 in C#? ### Response: int level = 945963;
3,660,946
en
Java
var_decl
beginner
How to declare a variable x with value 898248 in Java?
int x = 898248;
### Instruction: How to declare a variable x with value 898248 in Java? ### Response: int x = 898248;
20,050,058
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 29 простым.
public bool IsPrime() { int n = 29; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 29 простым. ### Response: public bool IsPrime() { int n = 29; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
39,538
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 8452.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8452));
### Instruction: Write a function in JavaScript that calculates the factorial of 8452. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(8452));
101,275
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 9931.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9931) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 9931. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9931) << std::endl;
4,194,767
en
Python
var_decl
beginner
How to declare a variable x with value 593651 in Python?
x = 593651
### Instruction: How to declare a variable x with value 593651 in Python? ### Response: x = 593651
4,075,583
en
Java
var_decl
beginner
How to declare a variable weight with value 240523 in Java?
int weight = 240523;
### Instruction: How to declare a variable weight with value 240523 in Java? ### Response: int weight = 240523;
20,325,978
kk
Python
logic_ops
intermediate
Python тилінде 389 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 389 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 389 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 389 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,196,636
kk
C++
var_decl
beginner
C++ тілінде 684664 мәнімен total айнымалысын қалай жариялауға болады?
int total = 684664;
### Instruction: C++ тілінде 684664 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 684664;
88,844,203
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; }
33,925,069
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
93,899,770
kk
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); }
25,618,175
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
45,159,893
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 389 простым.
public bool IsPrime() { int n = 389; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 389 простым. ### Response: public bool IsPrime() { int n = 389; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
908,877
ru
C#
var_decl
beginner
Как объявить переменную x со значением 409033 в C#?
int x = 409033;
### Instruction: Как объявить переменную x со значением 409033 в C#? ### Response: int x = 409033;
38,297,796
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]
2,638,145
kk
C#
var_decl
beginner
C# тілінде 99528 мәнімен value айнымалысын қалай жариялауға болады?
int value = 99528;
### Instruction: C# тілінде 99528 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 99528;
30,349,649
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
76,916,499
ru
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; }
53,835,106
kk
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; }
93,777,427
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; }
88,723,999
en
C++
logic_ops
intermediate
Write a function that determines if the number 75 is prime in C++.
public bool IsPrime() { int n = 75; 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 75 is prime in C++. ### Response: public bool IsPrime() { int n = 75; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,690,242
en
Unity
var_decl
beginner
How to declare a variable y with value 154366 in Unity?
int y = 154366;
### Instruction: How to declare a variable y with value 154366 in Unity? ### Response: int y = 154366;
33,932,934
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
771,225
kk
Unity
var_decl
beginner
Unity тілінде 936608 мәнімен count айнымалысын қалай жариялауға болады?
int count = 936608;
### Instruction: Unity тілінде 936608 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 936608;
10,499,129
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2086 високосным.
public bool IsLeap() { int y = 2086; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2086 високосным. ### Response: public bool IsLeap() { int y = 2086; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
57,513,415
kk
C++
logic_ops
advanced
C++ тилінде 86 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 86 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,570,207
en
Unity
logic_ops
intermediate
Write a function that determines if the number 280 is prime in Unity.
public bool IsPrime() { int n = 280; 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 280 is prime in Unity. ### Response: public bool IsPrime() { int n = 280; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
72,167,639
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 47 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 47; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 47 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 47; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
92,766,475
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; }
66,131
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 335.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(335)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 335. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(335)); }
62,466,033
en
Java
array_ops
advanced
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; }
60,549,106
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(); }
47,243,210
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);
76,792
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 8139.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8139));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 8139. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8139));
52,287,634
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2052 is a leap year in JavaScript.
function isLeap() { let y = 2052; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2052 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2052; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
23,881,494
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аеёиоуыэюя')
16,004,476
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; }
3,705,155
en
Python
var_decl
beginner
How to declare a variable speed with value 695577 in Python?
speed = 695577
### Instruction: How to declare a variable speed with value 695577 in Python? ### Response: speed = 695577
96,630,534
kk
Unity
array_ops
intermediate
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
74,438,793
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(); }