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
44,222,104
kk
C++
logic_ops
advanced
C++ тилінде 311 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 311; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 311 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 311; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
839,331
en
C++
var_decl
beginner
How to declare a variable speed with value 853359 in C++?
int speed = 853359;
### Instruction: How to declare a variable speed with value 853359 in C++? ### Response: int speed = 853359;
95,573,914
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; }
64,521,171
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2090 високосным.
public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2090 високосным. ### Response: public bool IsLeap() { int y = 2090; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
41,021,082
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; }
46,105,193
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]
2,653,040
en
Java
var_decl
beginner
How to declare a variable speed with value 668457 in Java?
int speed = 668457;
### Instruction: How to declare a variable speed with value 668457 in Java? ### Response: int speed = 668457;
3,466,917
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 434121 в C++?
int offset = 434121;
### Instruction: Как объявить переменную offset со значением 434121 в C++? ### Response: int offset = 434121;
10,729,129
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
57,288,884
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
13,760,422
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; }
56,419,162
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аеёиоуыэюя')
63,176,092
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(); }
962,994
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 517184 в JavaScript?
let data = 517184;
### Instruction: Как объявить переменную data со значением 517184 в JavaScript? ### Response: let data = 517184;
1,471,949
ru
Python
var_decl
beginner
Как объявить переменную result со значением 310504 в Python?
result = 310504
### Instruction: Как объявить переменную result со значением 310504 в Python? ### Response: result = 310504
4,010,023
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 651270 в JavaScript?
let x = 651270;
### Instruction: Как объявить переменную x со значением 651270 в JavaScript? ### Response: let x = 651270;
39,548,258
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аеёиоуыэюя')
96,580,689
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2064 високосным.
public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2064 високосным. ### Response: public bool IsLeap() { int y = 2064; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
44,254,849
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; }
65,552,155
kk
Java
logic_ops
intermediate
Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1997 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1997; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
20,350,028
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(); }
4,373,314
ru
C++
var_decl
beginner
Как объявить переменную size со значением 141453 в C++?
int size = 141453;
### Instruction: Как объявить переменную size со значением 141453 в C++? ### Response: int size = 141453;
23,799,535
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 240 простым.
public bool IsPrime() { int n = 240; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 240 простым. ### Response: public bool IsPrime() { int n = 240; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,853,940
en
Unity
string_ops
intermediate
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; }
24,891,428
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(); }
80,115,578
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
92,711,478
en
C#
logic_ops
intermediate
Write logic to check if the year 2091 is a leap year in C#.
public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2091 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,689,308
en
Python
logic_ops
advanced
Write a function that determines if the number 66 is prime in Python.
def is_prime(): n = 66 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 66 is prime in Python. ### Response: def is_prime(): n = 66 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,675,358
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 562652 в C++?
int buffer = 562652;
### Instruction: Как объявить переменную buffer со значением 562652 в C++? ### Response: int buffer = 562652;
27,737,469
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; }
49,252,354
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2069 високосным.
def is_leap(): year = 2069 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2069 високосным. ### Response: def is_leap(): year = 2069 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
89,207,836
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; }
95,111,700
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аеёиоуыэюя')
75,637,730
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; }
33,516,183
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
19,641,307
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2041 високосным.
function isLeap() { let y = 2041; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2041 високосным. ### Response: function isLeap() { let y = 2041; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
42,173,683
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 212 простым.
public bool IsPrime() { int n = 212; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 212 простым. ### Response: public bool IsPrime() { int n = 212; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
47,567,785
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 122 is prime in JavaScript.
function isPrime() { let n = 122; 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 122 is prime in JavaScript. ### Response: function isPrime() { let n = 122; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
49,459,584
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 222 простым.
public bool IsPrime() { int n = 222; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 222 простым. ### Response: public bool IsPrime() { int n = 222; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
32,784,197
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; }
2,707,744
en
Unity
var_decl
beginner
How to declare a variable rate with value 801430 in Unity?
int rate = 801430;
### Instruction: How to declare a variable rate with value 801430 in Unity? ### Response: int rate = 801430;
18,311,737
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in Java.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Java. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
621,095
ru
Python
var_decl
beginner
Как объявить переменную index со значением 776178 в Python?
index = 776178
### Instruction: Как объявить переменную index со значением 776178 в Python? ### Response: index = 776178
26,124
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 6370.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6370));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 6370. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6370));
3,648,216
kk
C++
var_decl
beginner
C++ тілінде 706683 мәнімен score айнымалысын қалай жариялауға болады?
int score = 706683;
### Instruction: C++ тілінде 706683 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 706683;
996,737
ru
Unity
var_decl
beginner
Как объявить переменную score со значением 488931 в Unity?
int score = 488931;
### Instruction: Как объявить переменную score со значением 488931 в Unity? ### Response: int score = 488931;
2,573,413
en
Java
var_decl
beginner
How to declare a variable value with value 938408 in Java?
int value = 938408;
### Instruction: How to declare a variable value with value 938408 in Java? ### Response: int value = 938408;
54,705,215
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; }
794,416
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 9893.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9893)); }
### Instruction: Write a function in Unity that calculates the factorial of 9893. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9893)); }
14,995,213
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
59,038,279
kk
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; }
22,366,485
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
81,937,581
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; }
18,708,956
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; }
2,735,924
kk
C#
var_decl
beginner
C# тілінде 380328 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 380328;
### Instruction: C# тілінде 380328 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 380328;
1,898,556
kk
C#
var_decl
beginner
C# тілінде 237949 мәнімен value айнымалысын қалай жариялауға болады?
int value = 237949;
### Instruction: C# тілінде 237949 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 237949;
54,450
kk
Python
factorial
advanced
Python тілінде 5705 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5705))
### Instruction: Python тілінде 5705 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5705))
2,982,510
en
Java
var_decl
beginner
How to declare a variable x with value 270358 in Java?
int x = 270358;
### Instruction: How to declare a variable x with value 270358 in Java? ### Response: int x = 270358;
92,480,424
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); }
75,233,531
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); }
3,717,248
ru
Java
var_decl
beginner
Как объявить переменную size со значением 639747 в Java?
int size = 639747;
### Instruction: Как объявить переменную size со значением 639747 в Java? ### Response: int size = 639747;
47,017,097
kk
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; }
15,496,823
kk
Python
logic_ops
intermediate
Python тилінде 487 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 487 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 487 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 487 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
78,665,029
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
56,479
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 8454.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8454));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 8454. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8454));
39,865,022
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; }
2,676,179
ru
Unity
var_decl
beginner
Как объявить переменную y со значением 451544 в Unity?
int y = 451544;
### Instruction: Как объявить переменную y со значением 451544 в Unity? ### Response: int y = 451544;
42,846,603
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1948 високосным.
def is_leap(): year = 1948 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1948 високосным. ### Response: def is_leap(): year = 1948 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,275,165
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 4980.
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(4980) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 4980. ### 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(4980) << std::endl;
18,194,610
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; }
50,433
en
C++
var_decl
beginner
How to declare a variable limit with value 337390 in C++?
int limit = 337390;
### Instruction: How to declare a variable limit with value 337390 in C++? ### Response: int limit = 337390;
94,164
kk
C#
factorial
advanced
C# тілінде 8532 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8532));
### Instruction: C# тілінде 8532 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8532));
37,522,649
en
C++
logic_ops
advanced
Write a function that determines if the number 299 is prime in C++.
public bool IsPrime() { int n = 299; 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 299 is prime in C++. ### Response: public bool IsPrime() { int n = 299; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,216,796
en
C#
var_decl
beginner
How to declare a variable total with value 947815 in C#?
int total = 947815;
### Instruction: How to declare a variable total with value 947815 in C#? ### Response: int total = 947815;
2,689,242
kk
JavaScript
var_decl
beginner
JavaScript тілінде 307406 мәнімен total айнымалысын қалай жариялауға болады?
let total = 307406;
### Instruction: JavaScript тілінде 307406 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 307406;
53,664,005
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,615,124
en
Python
var_decl
beginner
How to declare a variable speed with value 6671 in Python?
speed = 6671
### Instruction: How to declare a variable speed with value 6671 in Python? ### Response: speed = 6671
2,405,033
kk
JavaScript
var_decl
beginner
JavaScript тілінде 949842 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 949842;
### Instruction: JavaScript тілінде 949842 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 949842;
21,115,508
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript логику проверки, является ли год 1973 високосным.
function isLeap() { let y = 1973; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1973 високосным. ### Response: function isLeap() { let y = 1973; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,774,373
en
JavaScript
var_decl
beginner
How to declare a variable x with value 592880 in JavaScript?
let x = 592880;
### Instruction: How to declare a variable x with value 592880 in JavaScript? ### Response: let x = 592880;
884,275
kk
Python
factorial
advanced
Python тілінде 1227 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1227))
### Instruction: Python тілінде 1227 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1227))
81,455,668
kk
C++
string_ops
intermediate
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
42,260,070
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
4,092,074
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 389016 в Unity?
int count = 389016;
### Instruction: Как объявить переменную count со значением 389016 в Unity? ### Response: int count = 389016;
53,635
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1731.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1731)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 1731. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1731)); }
3,792,013
kk
C++
var_decl
beginner
C++ тілінде 278988 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 278988;
### Instruction: C++ тілінде 278988 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 278988;
42,064,299
en
C++
array_ops
intermediate
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
71,366,050
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 8 is prime in JavaScript.
function isPrime() { let n = 8; 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 8 is prime in JavaScript. ### Response: function isPrime() { let n = 8; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
66,357,135
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1950 високосным.
def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1950 високосным. ### Response: def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
487,858
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 7342-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(7342) << std::endl;
### Instruction: C++ тілінде 1-ден 7342-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(7342) << std::endl;
494,704
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 6139.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6139));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 6139. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(6139));
820,725
kk
C#
var_decl
beginner
C# тілінде 368907 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 368907;
### Instruction: C# тілінде 368907 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 368907;
4,535,115
kk
Python
var_decl
beginner
Python тілінде 820376 мәнімен y айнымалысын қалай жариялауға болады?
y = 820376
### Instruction: Python тілінде 820376 мәнімен y айнымалысын қалай жариялауға болады? ### Response: y = 820376
39,962,601
kk
C#
logic_ops
intermediate
C# тилінде 305 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 305; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 305 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 305; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
17,203,554
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аеёиоуыэюя')
175,552
en
Python
var_decl
beginner
How to declare a variable index with value 744404 in Python?
index = 744404
### Instruction: How to declare a variable index with value 744404 in Python? ### Response: index = 744404
1,247,588
ru
C#
var_decl
beginner
Как объявить переменную rate со значением 742230 в C#?
int rate = 742230;
### Instruction: Как объявить переменную rate со значением 742230 в C#? ### Response: int rate = 742230;
78,526,236
kk
C++
array_ops
advanced
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
67,913,212
en
C++
logic_ops
advanced
Write logic to check if the year 2036 is a leap year in C++.
public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2036 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,636,337
kk
Python
var_decl
beginner
Python тілінде 123467 мәнімен total айнымалысын қалай жариялауға болады?
total = 123467
### Instruction: Python тілінде 123467 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 123467