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
428,396
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 6554.
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(6554) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 6554. ### 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(6554) << std::endl;
97,329,682
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]
3,838,727
ru
C#
var_decl
beginner
Как объявить переменную x со значением 349135 в C#?
int x = 349135;
### Instruction: Как объявить переменную x со значением 349135 в C#? ### Response: int x = 349135;
85,356,032
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
63,402,640
en
Java
array_ops
intermediate
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,007,370
en
Unity
var_decl
beginner
How to declare a variable y with value 658871 in Unity?
int y = 658871;
### Instruction: How to declare a variable y with value 658871 in Unity? ### Response: int y = 658871;
84,501,520
en
C#
logic_ops
advanced
Write a function that determines if the number 351 is prime in C#.
public bool IsPrime() { int n = 351; 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 351 is prime in C#. ### Response: public bool IsPrime() { int n = 351; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
83,097,984
ru
C#
array_ops
advanced
Напишите на 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; }
29,163,501
en
Python
logic_ops
advanced
Write a function that determines if the number 79 is prime in Python.
def is_prime(): n = 79 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 79 is prime in Python. ### Response: def is_prime(): n = 79 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,957,885
en
JavaScript
var_decl
beginner
How to declare a variable level with value 453293 in JavaScript?
let level = 453293;
### Instruction: How to declare a variable level with value 453293 in JavaScript? ### Response: let level = 453293;
2,838,644
kk
C++
var_decl
beginner
C++ тілінде 93976 мәнімен index айнымалысын қалай жариялауға болады?
int index = 93976;
### Instruction: C++ тілінде 93976 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 93976;
2,982,076
kk
Java
var_decl
beginner
Java тілінде 595090 мәнімен index айнымалысын қалай жариялауға болады?
int index = 595090;
### Instruction: Java тілінде 595090 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 595090;
3,722,729
en
Python
var_decl
beginner
How to declare a variable index with value 91642 in Python?
index = 91642
### Instruction: How to declare a variable index with value 91642 in Python? ### Response: index = 91642
89,657,886
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2054 високосным.
def is_leap(): year = 2054 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2054 високосным. ### Response: def is_leap(): year = 2054 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
16,196,917
ru
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; }
590,475
kk
C#
sum_n
intermediate
C# тілінде 1-ден 7068-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7068));
### Instruction: C# тілінде 1-ден 7068-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7068));
85,060,666
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 120 простым.
public bool IsPrime() { int n = 120; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 120 простым. ### Response: public bool IsPrime() { int n = 120; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,685,358
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 888439 в Unity?
int speed = 888439;
### Instruction: Как объявить переменную speed со значением 888439 в Unity? ### Response: int speed = 888439;
47,675,919
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 2093 високосным.
function isLeap() { let y = 2093; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2093 високосным. ### Response: function isLeap() { let y = 2093; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
49,391,262
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1902 високосным.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1902 високосным. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
579,184
kk
JavaScript
var_decl
beginner
JavaScript тілінде 207823 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 207823;
### Instruction: JavaScript тілінде 207823 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 207823;
2,927,461
kk
C#
var_decl
beginner
C# тілінде 628746 мәнімен data айнымалысын қалай жариялауға болады?
int data = 628746;
### Instruction: C# тілінде 628746 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 628746;
2,964,166
en
Python
var_decl
beginner
How to declare a variable health with value 270539 in Python?
health = 270539
### Instruction: How to declare a variable health with value 270539 in Python? ### Response: health = 270539
531,896
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 3962.
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(3962) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 3962. ### 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(3962) << std::endl;
1,446,851
ru
C#
var_decl
beginner
Как объявить переменную count со значением 348587 в C#?
int count = 348587;
### Instruction: Как объявить переменную count со значением 348587 в C#? ### Response: int count = 348587;
71,981,575
en
Java
string_ops
intermediate
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(); }
77,342,426
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(); }
43,319,485
kk
Unity
string_ops
intermediate
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
28,241,955
en
Java
string_ops
intermediate
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(); }
38,582,316
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 204 простым.
def is_prime(): n = 204 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 204 простым. ### Response: def is_prime(): n = 204 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
10,146
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 8238-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8238));
### Instruction: JavaScript тілінде 1-ден 8238-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(8238));
89,256,910
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,919,003
ru
JavaScript
var_decl
beginner
Как объявить переменную limit со значением 167292 в JavaScript?
let limit = 167292;
### Instruction: Как объявить переменную limit со значением 167292 в JavaScript? ### Response: let limit = 167292;
18,633,927
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 412 простым.
public bool IsPrime() { int n = 412; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 412 простым. ### Response: public bool IsPrime() { int n = 412; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
45,152,924
kk
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);
597,237
kk
C#
factorial
advanced
C# тілінде 5992 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5992));
### Instruction: C# тілінде 5992 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5992));
78,785,112
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
2,194,631
ru
C++
var_decl
beginner
Как объявить переменную score со значением 926457 в C++?
int score = 926457;
### Instruction: Как объявить переменную score со значением 926457 в C++? ### Response: int score = 926457;
66,452,601
kk
Java
logic_ops
intermediate
Java тилінде 497 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 497; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 497 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 497; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,340,109
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; }
93,238,104
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,542,425
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 663097 в Unity?
int y = 663097;
### Instruction: Как объявить переменную y со значением 663097 в Unity? ### Response: int y = 663097;
26,575,659
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2057 високосным.
public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2057 високосным. ### Response: public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
580,210
kk
Java
sum_n
intermediate
Java тілінде 1-ден 2783-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2783));
### Instruction: Java тілінде 1-ден 2783-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2783));
40,245,895
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
796,473
ru
Unity
var_decl
beginner
Как объявить переменную result со значением 554989 в Unity?
int result = 554989;
### Instruction: Как объявить переменную result со значением 554989 в Unity? ### Response: int result = 554989;
45,819,623
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 290 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 290; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 290 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 290; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
3,763,497
kk
Java
var_decl
beginner
Java тілінде 633829 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 633829;
### Instruction: Java тілінде 633829 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 633829;
75,898,581
kk
Python
logic_ops
intermediate
Python тилінде 168 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 168 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 168 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 168 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,351,420
kk
Java
var_decl
beginner
Java тілінде 839277 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 839277;
### Instruction: Java тілінде 839277 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 839277;
83,784,291
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
79,154,081
kk
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); }
3,847,254
kk
C#
var_decl
beginner
C# тілінде 316377 мәнімен x айнымалысын қалай жариялауға болады?
int x = 316377;
### Instruction: C# тілінде 316377 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 316377;
11,185,816
ru
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; }
554,673
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 894.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(894))
### Instruction: Write a function in Python that calculates the factorial of 894. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(894))
40,992,332
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1935 is a leap year in JavaScript.
function isLeap() { let y = 1935; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1935 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1935; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,311,181
en
Java
var_decl
beginner
How to declare a variable total with value 644323 in Java?
int total = 644323;
### Instruction: How to declare a variable total with value 644323 in Java? ### Response: int total = 644323;
926,500
kk
Unity
var_decl
beginner
Unity тілінде 857162 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 857162;
### Instruction: Unity тілінде 857162 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 857162;
29,648,860
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2094 is a leap year in JavaScript.
function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2094 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2094; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,952,709
ru
Unity
var_decl
beginner
Как объявить переменную x со значением 212205 в Unity?
int x = 212205;
### Instruction: Как объявить переменную x со значением 212205 в Unity? ### Response: int x = 212205;
98,377,063
kk
Python
logic_ops
advanced
Python тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 205 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 205 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 205 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
23,590,603
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
87,481,355
kk
C#
logic_ops
advanced
C# тилінде 46 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 46; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 46 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 46; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,406,609
kk
JavaScript
var_decl
beginner
JavaScript тілінде 748618 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 748618;
### Instruction: JavaScript тілінде 748618 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 748618;
30,458,379
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; }
410,467
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5463.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5463)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5463. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5463)); }
1,821,547
en
C++
var_decl
beginner
How to declare a variable value with value 378087 in C++?
int value = 378087;
### Instruction: How to declare a variable value with value 378087 in C++? ### Response: int value = 378087;
47,962,097
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 298 простым.
public bool IsPrime() { int n = 298; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 298 простым. ### Response: public bool IsPrime() { int n = 298; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,921,741
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();
4,259,271
ru
JavaScript
var_decl
beginner
Как объявить переменную amount со значением 397700 в JavaScript?
let amount = 397700;
### Instruction: Как объявить переменную amount со значением 397700 в JavaScript? ### Response: let amount = 397700;
11,319,197
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
219,073
kk
JavaScript
factorial
advanced
JavaScript тілінде 1319 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1319));
### Instruction: JavaScript тілінде 1319 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(1319));
23,603,220
en
JavaScript
array_ops
advanced
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();
701,000
kk
Java
var_decl
beginner
Java тілінде 948115 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 948115;
### Instruction: Java тілінде 948115 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 948115;
40,807,613
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; }
44,596,846
ru
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); }
1,800,123
en
Java
var_decl
beginner
How to declare a variable timer with value 744352 in Java?
int timer = 744352;
### Instruction: How to declare a variable timer with value 744352 in Java? ### Response: int timer = 744352;
62,164,000
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)
3,111,831
kk
Python
var_decl
beginner
Python тілінде 718014 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 718014
### Instruction: Python тілінде 718014 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 718014
4,295,643
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 89477 в Unity?
int y = 89477;
### Instruction: Как объявить переменную y со значением 89477 в Unity? ### Response: int y = 89477;
17,081,284
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
13,872,862
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 326 простым.
public bool IsPrime() { int n = 326; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 326 простым. ### Response: public bool IsPrime() { int n = 326; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
39,734,625
ru
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аеёиоуыэюя')
12,614,415
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
19,391,055
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,021,850
en
C++
var_decl
beginner
How to declare a variable value with value 857649 in C++?
int value = 857649;
### Instruction: How to declare a variable value with value 857649 in C++? ### Response: int value = 857649;
4,548,833
en
Python
var_decl
beginner
How to declare a variable weight with value 143625 in Python?
weight = 143625
### Instruction: How to declare a variable weight with value 143625 in Python? ### Response: weight = 143625
43,433,215
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; }
75,286,263
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); }
79,205,588
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,840,035
kk
Unity
var_decl
beginner
Unity тілінде 656245 мәнімен health айнымалысын қалай жариялауға болады?
int health = 656245;
### Instruction: Unity тілінде 656245 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 656245;
43,088,371
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
2,785,155
ru
Python
var_decl
beginner
Как объявить переменную y со значением 309187 в Python?
y = 309187
### Instruction: Как объявить переменную y со значением 309187 в Python? ### Response: y = 309187
1,718,132
kk
C#
var_decl
beginner
C# тілінде 6428 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 6428;
### Instruction: C# тілінде 6428 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 6428;
2,000,263
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 320613 в Python?
limit = 320613
### Instruction: Как объявить переменную limit со значением 320613 в Python? ### Response: limit = 320613
3,220,132
kk
C#
var_decl
beginner
C# тілінде 165778 мәнімен result айнымалысын қалай жариялауға болады?
int result = 165778;
### Instruction: C# тілінде 165778 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 165778;
4,921,248
kk
JavaScript
var_decl
beginner
JavaScript тілінде 153576 мәнімен rate айнымалысын қалай жариялауға болады?
let rate = 153576;
### Instruction: JavaScript тілінде 153576 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: let rate = 153576;
86,713,412
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C# функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
22,395,055
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 321; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 321 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 321; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
29,983,794
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; }