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
83,924,568
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); }
42,344,754
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,667,013
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 74002 в JavaScript?
let index = 74002;
### Instruction: Как объявить переменную index со значением 74002 в JavaScript? ### Response: let index = 74002;
4,670,497
en
Python
var_decl
beginner
How to declare a variable x with value 861943 in Python?
x = 861943
### Instruction: How to declare a variable x with value 861943 in Python? ### Response: x = 861943
41,860,335
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; }
51,916,953
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1968 високосным.
function isLeap() { let y = 1968; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1968 високосным. ### Response: function isLeap() { let y = 1968; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
42,258,172
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; }
40,114,913
kk
Python
logic_ops
advanced
Python тилінде 15 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 15 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 15 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 15 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
84,292,241
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 341 простым.
public bool IsPrime() { int n = 341; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 341 простым. ### Response: public bool IsPrime() { int n = 341; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,931,146
kk
C++
var_decl
beginner
C++ тілінде 817877 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 817877;
### Instruction: C++ тілінде 817877 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 817877;
83,044,847
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; }
31,648,390
en
Python
array_ops
advanced
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)
458,314
kk
JavaScript
factorial
advanced
JavaScript тілінде 7217 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7217));
### Instruction: JavaScript тілінде 7217 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7217));
83,867,600
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(); }
29,994,469
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; }
31,742,787
en
C#
logic_ops
advanced
Write logic to check if the year 2064 is a leap year in C#.
public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2064 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
527,357
ru
Java
var_decl
beginner
Как объявить переменную x со значением 709481 в Java?
int x = 709481;
### Instruction: Как объявить переменную x со значением 709481 в Java? ### Response: int x = 709481;
34,496,224
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)
16,446,051
kk
Python
logic_ops
advanced
Python тилінде 481 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 481 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 481 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 481 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
181,451
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 6625.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6625))
### Instruction: Write a function in Python that calculates the factorial of 6625. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6625))
453,530
en
C#
var_decl
beginner
How to declare a variable score with value 383368 in C#?
int score = 383368;
### Instruction: How to declare a variable score with value 383368 in C#? ### Response: int score = 383368;
46,426,857
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
71,677,646
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
93,934,056
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1967 високосным.
public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1967 високосным. ### Response: public bool IsLeap() { int y = 1967; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,672
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 2160.
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(2160) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 2160. ### 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(2160) << std::endl;
15,076,089
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
2,553,374
en
Unity
var_decl
beginner
How to declare a variable total with value 189223 in Unity?
int total = 189223;
### Instruction: How to declare a variable total with value 189223 in Unity? ### Response: int total = 189223;
74,879,826
en
Python
logic_ops
intermediate
Write a function that determines if the number 397 is prime in Python.
def is_prime(): n = 397 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 397 is prime in Python. ### Response: def is_prime(): n = 397 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
19,721,100
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 418 простым.
public bool IsPrime() { int n = 418; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 418 простым. ### Response: public bool IsPrime() { int n = 418; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
77,993,110
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
42,512,748
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
80,111,763
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
3,629,787
kk
C++
var_decl
beginner
C++ тілінде 397022 мәнімен result айнымалысын қалай жариялауға болады?
int result = 397022;
### Instruction: C++ тілінде 397022 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 397022;
98,074,279
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]
46,398,047
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
16,203,284
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аеёиоуыэюя')
40,407,799
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2023 високосным.
public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2023 високосным. ### Response: public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,538,069
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 3973.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3973));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 3973. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3973));
469,601
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1394.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1394)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 1394. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1394)); }
59,133,495
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; }
91,360,734
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; }
62,098,103
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 2075 високосным.
public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2075 високосным. ### Response: public bool IsLeap() { int y = 2075; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,898,027
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1948 високосным.
public bool IsLeap() { int y = 1948; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1948 високосным. ### Response: public bool IsLeap() { int y = 1948; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
42,450,667
kk
C++
array_ops
intermediate
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,487,730
en
C#
var_decl
beginner
How to declare a variable y with value 26948 in C#?
int y = 26948;
### Instruction: How to declare a variable y with value 26948 in C#? ### Response: int y = 26948;
50,294,235
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; }
67,305,982
ru
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; }
2,131,715
ru
C#
var_decl
beginner
Как объявить переменную x со значением 476745 в C#?
int x = 476745;
### Instruction: Как объявить переменную x со значением 476745 в C#? ### Response: int x = 476745;
29,920,198
kk
Java
string_ops
intermediate
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
72,740,637
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; }
92,211,373
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]
67,182,395
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); }
1,396,234
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 766997 в JavaScript?
let health = 766997;
### Instruction: Как объявить переменную health со значением 766997 в JavaScript? ### Response: let health = 766997;
15,043
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 1312.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1312));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 1312. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(1312));
630,201
kk
C#
factorial
advanced
C# тілінде 9912 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9912));
### Instruction: C# тілінде 9912 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(9912));
11,437,083
kk
Java
logic_ops
intermediate
Java тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,658,548
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аеёиоуыэюя')
4,605,431
en
Java
var_decl
beginner
How to declare a variable x with value 530668 in Java?
int x = 530668;
### Instruction: How to declare a variable x with value 530668 in Java? ### Response: int x = 530668;
22,057,855
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; }
362,777
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 7727-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7727)); }
### Instruction: Unity тілінде 1-ден 7727-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7727)); }
68,832,586
kk
Python
logic_ops
advanced
Python тилінде 83 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 83 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
61,314,231
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; }
1,333,454
kk
Unity
var_decl
beginner
Unity тілінде 483193 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 483193;
### Instruction: Unity тілінде 483193 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 483193;
3,153,100
en
Python
var_decl
beginner
How to declare a variable index with value 131201 in Python?
index = 131201
### Instruction: How to declare a variable index with value 131201 in Python? ### Response: index = 131201
38,838,908
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(); }
398,068
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 7599.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7599));
### Instruction: Write a function in JavaScript that calculates the factorial of 7599. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7599));
2,850,250
en
Java
var_decl
beginner
How to declare a variable timer with value 194322 in Java?
int timer = 194322;
### Instruction: How to declare a variable timer with value 194322 in Java? ### Response: int timer = 194322;
99,075,894
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); }
152,082
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 9625.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9625))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 9625. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(9625))
794,181
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 9236.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9236));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 9236. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9236));
9,889
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 7267.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7267));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 7267. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7267));
53,262,672
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
66,913,025
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; }
3,919,871
kk
JavaScript
var_decl
beginner
JavaScript тілінде 434027 мәнімен y айнымалысын қалай жариялауға болады?
let y = 434027;
### Instruction: JavaScript тілінде 434027 мәнімен y айнымалысын қалай жариялауға болады? ### Response: let y = 434027;
96,879,060
en
C#
logic_ops
advanced
Write logic to check if the year 1969 is a leap year in C#.
public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1969 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
15,225,928
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; }
48,147,762
kk
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; }
42,658,618
kk
Python
logic_ops
intermediate
Python тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1916 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1916 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1916 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
83,721,974
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); }
37,225,619
en
Python
string_ops
intermediate
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
86,430,475
en
Unity
logic_ops
intermediate
Write a function that determines if the number 7 is prime in Unity.
public bool IsPrime() { int n = 7; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Write a function that determines if the number 7 is prime in Unity. ### Response: public bool IsPrime() { int n = 7; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
41,464,492
en
Java
logic_ops
advanced
Write logic to check if the year 2068 is a leap year in Java.
public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2068 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2068; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
35,225,764
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 349 простым.
public bool IsPrime() { int n = 349; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 349 простым. ### Response: public bool IsPrime() { int n = 349; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
41,916,911
kk
C#
logic_ops
advanced
C# тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1933 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
19,801,891
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; }
10,651,373
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; }
77,290,997
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; }
2,812,985
kk
C++
var_decl
beginner
C++ тілінде 293620 мәнімен score айнымалысын қалай жариялауға болады?
int score = 293620;
### Instruction: C++ тілінде 293620 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 293620;
22,468,973
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 143 простым.
public bool IsPrime() { int n = 143; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 143 простым. ### Response: public bool IsPrime() { int n = 143; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
73,242,173
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
46,888
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 3333.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3333));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 3333. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3333));
62,757,509
kk
C#
logic_ops
advanced
C# тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1943; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
10,911,977
en
Java
string_ops
advanced
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; }
81,832,242
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(); }
58,469,906
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
23,026,791
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; }
37,048,345
en
Java
logic_ops
advanced
Write logic to check if the year 2062 is a leap year in Java.
public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2062 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2062; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,266,770
kk
Java
logic_ops
intermediate
Java тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 40; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 40 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 40; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
633,304
en
Python
var_decl
beginner
How to declare a variable level with value 773508 in Python?
level = 773508
### Instruction: How to declare a variable level with value 773508 in Python? ### Response: level = 773508
67,779,452
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; }