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
2,492,095
en
Unity
var_decl
beginner
How to declare a variable score with value 807826 in Unity?
int score = 807826;
### Instruction: How to declare a variable score with value 807826 in Unity? ### Response: int score = 807826;
59,292,880
kk
Java
array_ops
intermediate
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,455,357
kk
C++
var_decl
beginner
C++ тілінде 354136 мәнімен result айнымалысын қалай жариялауға болады?
int result = 354136;
### Instruction: C++ тілінде 354136 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 354136;
21,646,657
en
Java
array_ops
intermediate
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; }
51,292,466
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 188 простым.
def is_prime(): n = 188 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 188 простым. ### Response: def is_prime(): n = 188 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
15,575,031
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
76,900,905
en
JavaScript
array_ops
intermediate
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);
62,672,007
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
12,031,805
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); }
162,159
kk
JavaScript
factorial
advanced
JavaScript тілінде 7415 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7415));
### Instruction: JavaScript тілінде 7415 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7415));
2,272,435
kk
Python
var_decl
beginner
Python тілінде 431520 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 431520
### Instruction: Python тілінде 431520 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 431520
237,860
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 8654.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8654));
### Instruction: Write a function in C# that sums numbers from 1 to 8654. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8654));
2,732,923
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 700899 в Python?
weight = 700899
### Instruction: Как объявить переменную weight со значением 700899 в Python? ### Response: weight = 700899
42,554,542
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; }
479,101
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 1534.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1534)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 1534. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1534)); }
37,380,008
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
341,505
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 2309-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2309)); }
### Instruction: Unity тілінде 1-ден 2309-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2309)); }
59,639,827
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(); }
75,729,789
kk
Python
logic_ops
intermediate
Python тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 478 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 478 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
778,625
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8353.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8353));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8353. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8353));
97,369,397
ru
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; }
627,852
kk
Python
factorial
advanced
Python тілінде 6052 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6052))
### Instruction: Python тілінде 6052 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6052))
50,997,062
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; }
3,165,872
kk
Java
var_decl
beginner
Java тілінде 677622 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 677622;
### Instruction: Java тілінде 677622 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 677622;
356,216
kk
Java
factorial
advanced
Java тілінде 302 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(302));
### Instruction: Java тілінде 302 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(302));
713,199
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1953.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1953)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 1953. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1953)); }
2,089,632
kk
C++
var_decl
beginner
C++ тілінде 48732 мәнімен y айнымалысын қалай жариялауға болады?
int y = 48732;
### Instruction: C++ тілінде 48732 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 48732;
519,105
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 610.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(610));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 610. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(610));
78,660,554
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
4,892,949
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 875877 в C#?
int timer = 875877;
### Instruction: Как объявить переменную timer со значением 875877 в C#? ### Response: int timer = 875877;
95,434,977
kk
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); }
77,870,873
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; }
47,021,886
kk
Unity
logic_ops
intermediate
Unity тилінде 386 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 386; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 386 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 386; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,793,355
kk
C#
var_decl
beginner
C# тілінде 536189 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 536189;
### Instruction: C# тілінде 536189 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 536189;
6,466
ru
C#
func_def
intermediate
Напиши функцию process в C#, которая принимает score и удваивает его.
static int process(int score) { return score * 2; }
### Instruction: Напиши функцию process в C#, которая принимает score и удваивает его. ### Response: static int process(int score) { return score * 2; }
43,512,002
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,075,419
kk
Python
var_decl
beginner
Python тілінде 845020 мәнімен level айнымалысын қалай жариялауға болады?
level = 845020
### Instruction: Python тілінде 845020 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 845020
80,386,843
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,079,228
en
Python
var_decl
beginner
How to declare a variable amount with value 294795 in Python?
amount = 294795
### Instruction: How to declare a variable amount with value 294795 in Python? ### Response: amount = 294795
67,238,377
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(); }
4,079,714
en
Java
var_decl
beginner
How to declare a variable buffer with value 176514 in Java?
int buffer = 176514;
### Instruction: How to declare a variable buffer with value 176514 in Java? ### Response: int buffer = 176514;
58,309,102
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 154 is prime in JavaScript.
function isPrime() { let n = 154; 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 154 is prime in JavaScript. ### Response: function isPrime() { let n = 154; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
43,511,740
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 375 простым.
function isPrime() { let n = 375; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 375 простым. ### Response: function isPrime() { let n = 375; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
21,910,836
kk
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); }
4,931,653
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 423225 в Unity?
int score = 423225;
### Instruction: Как объявить переменную score со значением 423225 в Unity? ### Response: int score = 423225;
75,895,936
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
70,298,141
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
46,686,404
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; }
54,901,714
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; }
52,641,217
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
59,876,828
ru
Unity
string_ops
advanced
Напишите на 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; }
79,406,849
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; }
15,194,563
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
171,573
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 210.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(210))
### Instruction: Write a function in Python that sums numbers from 1 to 210. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(210))
237,049
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 7142-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7142)); }
### Instruction: Unity тілінде 1-ден 7142-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7142)); }
1,798,185
kk
Java
var_decl
beginner
Java тілінде 64191 мәнімен level айнымалысын қалай жариялауға болады?
int level = 64191;
### Instruction: Java тілінде 64191 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 64191;
25,606,347
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,629,172
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 42517 в Python?
limit = 42517
### Instruction: Как объявить переменную limit со значением 42517 в Python? ### Response: limit = 42517
77,671,061
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
3,996,507
en
Python
var_decl
beginner
How to declare a variable rate with value 568005 in Python?
rate = 568005
### Instruction: How to declare a variable rate with value 568005 in Python? ### Response: rate = 568005
45,402,176
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 345 простым.
public bool IsPrime() { int n = 345; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 345 простым. ### Response: public bool IsPrime() { int n = 345; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,336,504
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(); }
144,911
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 6929.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6929));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 6929. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6929));
2,968,778
en
Python
var_decl
beginner
How to declare a variable rate with value 190880 in Python?
rate = 190880
### Instruction: How to declare a variable rate with value 190880 in Python? ### Response: rate = 190880
539,361
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 2543.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2543));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 2543. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2543));
45,950,276
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; }
76,961,783
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); }
4,664,630
kk
Unity
var_decl
beginner
Unity тілінде 593727 мәнімен score айнымалысын қалай жариялауға болады?
int score = 593727;
### Instruction: Unity тілінде 593727 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 593727;
48,552,660
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1918 високосным.
function isLeap() { let y = 1918; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1918 високосным. ### Response: function isLeap() { let y = 1918; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
66,091,793
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
80,805,582
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аеёиоуыэюя')
3,256,626
kk
C#
var_decl
beginner
C# тілінде 405115 мәнімен size айнымалысын қалай жариялауға болады?
int size = 405115;
### Instruction: C# тілінде 405115 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 405115;
37,761,648
en
JavaScript
string_ops
intermediate
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
34,579,176
en
C#
logic_ops
advanced
Write a function that determines if the number 190 is prime in C#.
public bool IsPrime() { int n = 190; 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 190 is prime in C#. ### Response: public bool IsPrime() { int n = 190; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
51,277,980
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; }
229,823
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 7774.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7774));
### Instruction: Write a function in C# that calculates the factorial of 7774. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7774));
872,617
kk
C#
var_decl
beginner
C# тілінде 398400 мәнімен level айнымалысын қалай жариялауға болады?
int level = 398400;
### Instruction: C# тілінде 398400 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 398400;
2,278,278
ru
C++
var_decl
beginner
Как объявить переменную level со значением 269096 в C++?
int level = 269096;
### Instruction: Как объявить переменную level со значением 269096 в C++? ### Response: int level = 269096;
18,926,391
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); }
4,016,899
en
Python
var_decl
beginner
How to declare a variable y with value 532963 in Python?
y = 532963
### Instruction: How to declare a variable y with value 532963 in Python? ### Response: y = 532963
3,175,738
kk
Java
var_decl
beginner
Java тілінде 301452 мәнімен count айнымалысын қалай жариялауға болады?
int count = 301452;
### Instruction: Java тілінде 301452 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 301452;
2,674,661
kk
Python
var_decl
beginner
Python тілінде 613096 мәнімен size айнымалысын қалай жариялауға болады?
size = 613096
### Instruction: Python тілінде 613096 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 613096
80,418,818
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
72,542,343
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(); }
3,328,205
ru
C#
var_decl
beginner
Как объявить переменную level со значением 319083 в C#?
int level = 319083;
### Instruction: Как объявить переменную level со значением 319083 в C#? ### Response: int level = 319083;
1,142,127
en
Python
var_decl
beginner
How to declare a variable size with value 194765 in Python?
size = 194765
### Instruction: How to declare a variable size with value 194765 in Python? ### Response: size = 194765
74,494,194
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; }
70,625,638
kk
Java
logic_ops
advanced
Java тилінде 70 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 70; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 70 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 70; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,930,305
kk
Unity
var_decl
beginner
Unity тілінде 517313 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 517313;
### Instruction: Unity тілінде 517313 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 517313;
62,201,130
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
646,111
ru
C#
var_decl
beginner
Как объявить переменную amount со значением 819039 в C#?
int amount = 819039;
### Instruction: Как объявить переменную amount со значением 819039 в C#? ### Response: int amount = 819039;
14,300,950
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
51,274
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 1235.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1235) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 1235. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1235) << std::endl;
65,785,306
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
39,501,161
kk
Python
logic_ops
advanced
Python тилінде 454 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 454 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 454 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 454 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
102,606
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 5882.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5882))
### Instruction: Write a function in Python that calculates the factorial of 5882. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5882))
71,004,637
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1997 високосным.
function isLeap() { let y = 1997; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1997 високосным. ### Response: function isLeap() { let y = 1997; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
96,340,923
en
JavaScript
array_ops
intermediate
Write a function that reverses a list in JavaScript.
const reverseArr = arr => arr.reverse();
### Instruction: Write a function that reverses a list in JavaScript. ### Response: const reverseArr = arr => arr.reverse();
4,850,320
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 410660 в C++?
int buffer = 410660;
### Instruction: Как объявить переменную buffer со значением 410660 в C++? ### Response: int buffer = 410660;
16,060,500
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C++ функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }