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
86,465,819
kk
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; }
61,912,170
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
63,897,734
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();
97,678,125
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);
99,288,562
kk
Unity
logic_ops
intermediate
Unity тилінде 272 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 272; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 272 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 272; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,106,775
kk
C#
var_decl
beginner
C# тілінде 827775 мәнімен size айнымалысын қалай жариялауға болады?
int size = 827775;
### Instruction: C# тілінде 827775 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 827775;
46,749,091
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
1,148,107
kk
C++
var_decl
beginner
C++ тілінде 134629 мәнімен count айнымалысын қалай жариялауға болады?
int count = 134629;
### Instruction: C++ тілінде 134629 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 134629;
253,556
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 5373.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5373) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 5373. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(5373) << std::endl;
62,882,528
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; }
2,015,012
en
C++
var_decl
beginner
How to declare a variable result with value 164725 in C++?
int result = 164725;
### Instruction: How to declare a variable result with value 164725 in C++? ### Response: int result = 164725;
35,257,939
ru
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; }
66,912,565
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
46,024,004
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1914 високосным.
function isLeap() { let y = 1914; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1914 високосным. ### Response: function isLeap() { let y = 1914; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
2,355,945
en
Java
var_decl
beginner
How to declare a variable value with value 538985 in Java?
int value = 538985;
### Instruction: How to declare a variable value with value 538985 in Java? ### Response: int value = 538985;
34,786,486
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
94,284,353
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 239 is prime in JavaScript.
function isPrime() { let n = 239; 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 239 is prime in JavaScript. ### Response: function isPrime() { let n = 239; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
162,966
kk
Python
factorial
advanced
Python тілінде 560 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(560))
### Instruction: Python тілінде 560 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(560))
85,002,819
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
59,252,139
kk
C#
logic_ops
advanced
C# тилінде 16 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 16; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 16 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 16; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
14,563,607
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; }
89,073
kk
Unity
factorial
advanced
Unity тілінде 9416 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9416)); }
### Instruction: Unity тілінде 9416 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9416)); }
70,079,484
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; }
2,797,985
kk
Python
var_decl
beginner
Python тілінде 862364 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 862364
### Instruction: Python тілінде 862364 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 862364
4,729,481
kk
C++
var_decl
beginner
C++ тілінде 357202 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 357202;
### Instruction: C++ тілінде 357202 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 357202;
22,505,342
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); }
84,266,678
en
Java
logic_ops
intermediate
Write a function that determines if the number 439 is prime in Java.
public bool IsPrime() { int n = 439; 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 439 is prime in Java. ### Response: public bool IsPrime() { int n = 439; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
28,912,659
en
C#
logic_ops
intermediate
Write a function that determines if the number 248 is prime in C#.
public bool IsPrime() { int n = 248; 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 248 is prime in C#. ### Response: public bool IsPrime() { int n = 248; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
69,642,675
kk
Java
logic_ops
advanced
Java тилінде 439 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 439; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 439 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 439; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,449,219
en
Unity
var_decl
beginner
How to declare a variable speed with value 484790 in Unity?
int speed = 484790;
### Instruction: How to declare a variable speed with value 484790 in Unity? ### Response: int speed = 484790;
334,117
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 7516.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7516)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 7516. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7516)); }
64,937,061
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
1,561,652
en
C++
var_decl
beginner
How to declare a variable level with value 127315 in C++?
int level = 127315;
### Instruction: How to declare a variable level with value 127315 in C++? ### Response: int level = 127315;
10,684
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 50.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(50));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 50. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(50));
83,416,657
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 68 простым.
public bool IsPrime() { int n = 68; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 68 простым. ### Response: public bool IsPrime() { int n = 68; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
65,172,454
en
Java
logic_ops
advanced
Write logic to check if the year 2089 is a leap year in Java.
public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2089 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2089; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
24,975,786
ru
Python
array_ops
advanced
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
26,420,752
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; }
896,603
kk
C#
var_decl
beginner
C# тілінде 298663 мәнімен size айнымалысын қалай жариялауға болады?
int size = 298663;
### Instruction: C# тілінде 298663 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 298663;
54,799,390
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); }
3,386,846
kk
Unity
var_decl
beginner
Unity тілінде 750831 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 750831;
### Instruction: Unity тілінде 750831 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 750831;
3,561,715
kk
Unity
var_decl
beginner
Unity тілінде 468838 мәнімен x айнымалысын қалай жариялауға болады?
int x = 468838;
### Instruction: Unity тілінде 468838 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 468838;
69,602,567
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; }
2,620,044
en
Unity
var_decl
beginner
How to declare a variable score with value 572224 in Unity?
int score = 572224;
### Instruction: How to declare a variable score with value 572224 in Unity? ### Response: int score = 572224;
3,285,343
kk
C++
var_decl
beginner
C++ тілінде 236474 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 236474;
### Instruction: C++ тілінде 236474 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 236474;
10,184,855
kk
Unity
array_ops
advanced
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
84,640,153
kk
Java
logic_ops
advanced
Java тилінде 1905 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1905; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1905 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1905; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,691,151
en
C#
string_ops
advanced
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; }
59,256,290
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 309 is prime in JavaScript.
function isPrime() { let n = 309; 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 309 is prime in JavaScript. ### Response: function isPrime() { let n = 309; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
47,674,074
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);
1,021,964
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 8158.
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(8158) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 8158. ### 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(8158) << std::endl;
16,759,172
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
58,889,042
en
Python
string_ops
intermediate
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
63,438,592
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; }
66,371,366
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,728,892
ru
C++
var_decl
beginner
Как объявить переменную size со значением 306472 в C++?
int size = 306472;
### Instruction: Как объявить переменную size со значением 306472 в C++? ### Response: int size = 306472;
69,789,562
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; }
32,910,403
kk
Unity
string_ops
intermediate
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
69,612,446
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
614,351
kk
C#
factorial
advanced
C# тілінде 5313 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5313));
### Instruction: C# тілінде 5313 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5313));
52,923,179
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2078 високосным.
def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2078 високосным. ### Response: def is_leap(): year = 2078 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,501,633
en
JavaScript
var_decl
beginner
How to declare a variable limit with value 987036 in JavaScript?
let limit = 987036;
### Instruction: How to declare a variable limit with value 987036 in JavaScript? ### Response: let limit = 987036;
45,246,859
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,755,552
ru
C#
var_decl
beginner
Как объявить переменную value со значением 739104 в C#?
int value = 739104;
### Instruction: Как объявить переменную value со значением 739104 в C#? ### Response: int value = 739104;
19,304,083
ru
C#
string_ops
advanced
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
3,667,579
en
JavaScript
var_decl
beginner
How to declare a variable x with value 99561 in JavaScript?
let x = 99561;
### Instruction: How to declare a variable x with value 99561 in JavaScript? ### Response: let x = 99561;
2,123,556
en
C#
var_decl
beginner
How to declare a variable count with value 3350 in C#?
int count = 3350;
### Instruction: How to declare a variable count with value 3350 in C#? ### Response: int count = 3350;
1,457,601
en
Java
var_decl
beginner
How to declare a variable health with value 252307 in Java?
int health = 252307;
### Instruction: How to declare a variable health with value 252307 in Java? ### Response: int health = 252307;
77,658,569
en
Python
array_ops
intermediate
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]
4,485,804
kk
Python
var_decl
beginner
Python тілінде 337951 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 337951
### Instruction: Python тілінде 337951 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 337951
1,100,494
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6405-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6405));
### Instruction: C# тілінде 1-ден 6405-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6405));
31,289,207
en
Python
logic_ops
advanced
Write a function that determines if the number 366 is prime in Python.
def is_prime(): n = 366 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 366 is prime in Python. ### Response: def is_prime(): n = 366 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
10,304,618
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,052,079
kk
Java
var_decl
beginner
Java тілінде 187004 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 187004;
### Instruction: Java тілінде 187004 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 187004;
2,994,357
kk
Unity
var_decl
beginner
Unity тілінде 569105 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 569105;
### Instruction: Unity тілінде 569105 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 569105;
84,341,814
en
JavaScript
logic_ops
intermediate
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); }
79,873,933
en
C++
logic_ops
advanced
Write a function that determines if the number 312 is prime in C++.
public bool IsPrime() { int n = 312; 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 312 is prime in C++. ### Response: public bool IsPrime() { int n = 312; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,871,103
en
C++
var_decl
beginner
How to declare a variable limit with value 135011 in C++?
int limit = 135011;
### Instruction: How to declare a variable limit with value 135011 in C++? ### Response: int limit = 135011;
3,291,634
en
Python
var_decl
beginner
How to declare a variable level with value 769699 in Python?
level = 769699
### Instruction: How to declare a variable level with value 769699 in Python? ### Response: level = 769699
1,802,781
en
Python
var_decl
beginner
How to declare a variable weight with value 626494 in Python?
weight = 626494
### Instruction: How to declare a variable weight with value 626494 in Python? ### Response: weight = 626494
18,570,918
kk
Python
logic_ops
intermediate
Python тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2068 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2068 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
45,563,720
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
61,927,458
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); }
644,224
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 4931-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4931));
### Instruction: JavaScript тілінде 1-ден 4931-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4931));
46,091,589
en
C++
string_ops
advanced
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(); }
11,662,981
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1917 високосным.
public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1917 високосным. ### Response: public bool IsLeap() { int y = 1917; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
88,515,725
kk
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,357,521
kk
Unity
var_decl
beginner
Unity тілінде 375543 мәнімен count айнымалысын қалай жариялауға болады?
int count = 375543;
### Instruction: Unity тілінде 375543 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 375543;
3,849,958
ru
C++
var_decl
beginner
Как объявить переменную y со значением 592354 в C++?
int y = 592354;
### Instruction: Как объявить переменную y со значением 592354 в C++? ### Response: int y = 592354;
43,476,007
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 2007 високосным.
def is_leap(): year = 2007 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2007 високосным. ### Response: def is_leap(): year = 2007 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
161,106
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 7589.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7589)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 7589. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7589)); }
64,815,253
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1961 високосным.
public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1961 високосным. ### Response: public bool IsLeap() { int y = 1961; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,317,985
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; }
4,329,550
en
Python
var_decl
beginner
How to declare a variable offset with value 626091 in Python?
offset = 626091
### Instruction: How to declare a variable offset with value 626091 in Python? ### Response: offset = 626091
4,601,608
en
Java
var_decl
beginner
How to declare a variable limit with value 253123 in Java?
int limit = 253123;
### Instruction: How to declare a variable limit with value 253123 in Java? ### Response: int limit = 253123;
4,493,158
en
JavaScript
var_decl
beginner
How to declare a variable index with value 953283 in JavaScript?
let index = 953283;
### Instruction: How to declare a variable index with value 953283 in JavaScript? ### Response: let index = 953283;
784,954
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 3837.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3837));
### Instruction: Write a function in C# that calculates the factorial of 3837. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(3837));
97,334,068
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Unity функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
66,516,060
en
Java
logic_ops
advanced
Write logic to check if the year 2000 is a leap year in Java.
public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2000 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2000; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
95,524,742
ru
JavaScript
logic_ops
intermediate
Напишите на 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); }