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
4,350,896
en
C#
var_decl
beginner
How to declare a variable limit with value 268085 in C#?
int limit = 268085;
### Instruction: How to declare a variable limit with value 268085 in C#? ### Response: int limit = 268085;
98,111,692
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();
89,878,468
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; }
44,701,677
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 336 простым.
public bool IsPrime() { int n = 336; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 336 простым. ### Response: public bool IsPrime() { int n = 336; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
96,002,696
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,989,944
en
Unity
var_decl
beginner
How to declare a variable weight with value 722691 in Unity?
int weight = 722691;
### Instruction: How to declare a variable weight with value 722691 in Unity? ### Response: int weight = 722691;
40,214,139
en
Java
logic_ops
intermediate
Write a function that determines if the number 465 is prime in Java.
public bool IsPrime() { int n = 465; 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 465 is prime in Java. ### Response: public bool IsPrime() { int n = 465; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,743,183
ru
C++
var_decl
beginner
Как объявить переменную count со значением 699082 в C++?
int count = 699082;
### Instruction: Как объявить переменную count со значением 699082 в C++? ### Response: int count = 699082;
13,356,375
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; }
4,933,073
en
Java
var_decl
beginner
How to declare a variable limit with value 951087 in Java?
int limit = 951087;
### Instruction: How to declare a variable limit with value 951087 in Java? ### Response: int limit = 951087;
4,621,877
kk
C++
var_decl
beginner
C++ тілінде 982921 мәнімен level айнымалысын қалай жариялауға болады?
int level = 982921;
### Instruction: C++ тілінде 982921 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 982921;
83,597,436
en
Python
array_ops
advanced
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]
14,624
kk
C#
factorial
advanced
C# тілінде 4042 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4042));
### Instruction: C# тілінде 4042 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4042));
55,273,422
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
44,417,644
ru
Python
string_ops
advanced
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
29,494,794
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);
70,584,368
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1930 високосным.
public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1930 високосным. ### Response: public bool IsLeap() { int y = 1930; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
33,136,833
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; }
89,432,351
en
C++
array_ops
intermediate
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
69,403,296
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; }
106,685
en
C++
var_decl
beginner
How to declare a variable result with value 139512 in C++?
int result = 139512;
### Instruction: How to declare a variable result with value 139512 in C++? ### Response: int result = 139512;
87,360,493
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; }
254,772
kk
Unity
var_decl
beginner
Unity тілінде 76799 мәнімен size айнымалысын қалай жариялауға болады?
int size = 76799;
### Instruction: Unity тілінде 76799 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 76799;
14,362,767
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аеёиоуыэюя')
2,717,164
kk
JavaScript
var_decl
beginner
JavaScript тілінде 903287 мәнімен count айнымалысын қалай жариялауға болады?
let count = 903287;
### Instruction: JavaScript тілінде 903287 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 903287;
55,426,243
en
Unity
logic_ops
intermediate
Write a function that determines if the number 436 is prime in Unity.
public bool IsPrime() { int n = 436; 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 436 is prime in Unity. ### Response: public bool IsPrime() { int n = 436; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,187,624
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 942275 в JavaScript?
let health = 942275;
### Instruction: Как объявить переменную health со значением 942275 в JavaScript? ### Response: let health = 942275;
18,369,065
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); }
4,690,986
kk
Python
var_decl
beginner
Python тілінде 757078 мәнімен index айнымалысын қалай жариялауға болады?
index = 757078
### Instruction: Python тілінде 757078 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 757078
4,247,601
en
Python
var_decl
beginner
How to declare a variable value with value 81073 in Python?
value = 81073
### Instruction: How to declare a variable value with value 81073 in Python? ### Response: value = 81073
769,067
en
Java
var_decl
beginner
How to declare a variable value with value 214968 in Java?
int value = 214968;
### Instruction: How to declare a variable value with value 214968 in Java? ### Response: int value = 214968;
2,376,259
en
C#
var_decl
beginner
How to declare a variable limit with value 719683 in C#?
int limit = 719683;
### Instruction: How to declare a variable limit with value 719683 in C#? ### Response: int limit = 719683;
4,308,063
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 540340 в JavaScript?
let level = 540340;
### Instruction: Как объявить переменную level со значением 540340 в JavaScript? ### Response: let level = 540340;
81,762,007
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
91,484,971
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; }
59,769,538
en
Unity
array_ops
intermediate
Write a function that finds the maximum number in an array in Unity.
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 Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
45,766,759
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; }
57,902,688
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
3,578,003
ru
JavaScript
var_decl
beginner
Как объявить переменную amount со значением 795018 в JavaScript?
let amount = 795018;
### Instruction: Как объявить переменную amount со значением 795018 в JavaScript? ### Response: let amount = 795018;
73,945,639
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
34,027,795
en
Python
logic_ops
advanced
Write logic to check if the year 2044 is a leap year in Python.
def is_leap(): year = 2044 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2044 is a leap year in Python. ### Response: def is_leap(): year = 2044 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
842,482
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 2359.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2359) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 2359. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2359) << std::endl;
2,740,770
en
Unity
var_decl
beginner
How to declare a variable result with value 602164 in Unity?
int result = 602164;
### Instruction: How to declare a variable result with value 602164 in Unity? ### Response: int result = 602164;
32,459,043
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,745,182
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; }
1,907,285
en
C#
var_decl
beginner
How to declare a variable total with value 391452 in C#?
int total = 391452;
### Instruction: How to declare a variable total with value 391452 in C#? ### Response: int total = 391452;
49,809,719
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
4,069,261
ru
C#
var_decl
beginner
Как объявить переменную y со значением 727536 в C#?
int y = 727536;
### Instruction: Как объявить переменную y со значением 727536 в C#? ### Response: int y = 727536;
93,588,611
ru
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; }
79,719,072
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
27,310,981
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1978 високосным.
def is_leap(): year = 1978 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1978 високосным. ### Response: def is_leap(): year = 1978 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
94,783,233
en
Unity
logic_ops
advanced
Write a function that determines if the number 303 is prime in Unity.
public bool IsPrime() { int n = 303; 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 303 is prime in Unity. ### Response: public bool IsPrime() { int n = 303; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,964,051
kk
C++
var_decl
beginner
C++ тілінде 111404 мәнімен health айнымалысын қалай жариялауға болады?
int health = 111404;
### Instruction: C++ тілінде 111404 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 111404;
89,798,432
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 399 простым.
public bool IsPrime() { int n = 399; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 399 простым. ### Response: public bool IsPrime() { int n = 399; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
27,982,233
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; }
2,548,690
en
C++
var_decl
beginner
How to declare a variable count with value 865508 in C++?
int count = 865508;
### Instruction: How to declare a variable count with value 865508 in C++? ### Response: int count = 865508;
57,296,665
kk
C#
logic_ops
advanced
C# тилінде 432 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 432; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 432 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 432; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,115,914
en
Python
var_decl
beginner
How to declare a variable limit with value 134610 in Python?
limit = 134610
### Instruction: How to declare a variable limit with value 134610 in Python? ### Response: limit = 134610
43,482,391
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
89,978,011
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2032 is a leap year in JavaScript.
function isLeap() { let y = 2032; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2032 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2032; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
97,331,789
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; }
69,842,491
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Unity функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,045,392
ru
Unity
var_decl
beginner
Как объявить переменную count со значением 470623 в Unity?
int count = 470623;
### Instruction: Как объявить переменную count со значением 470623 в Unity? ### Response: int count = 470623;
16,345,258
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1904; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1904 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1904; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,633,625
en
Java
var_decl
beginner
How to declare a variable timer with value 339776 in Java?
int timer = 339776;
### Instruction: How to declare a variable timer with value 339776 in Java? ### Response: int timer = 339776;
95,447,214
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; }
27,631,334
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1997 високосным.
def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1997 високосным. ### Response: def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
35,514,040
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1938; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1938 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1938; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
4,220,982
kk
C#
var_decl
beginner
C# тілінде 160434 мәнімен index айнымалысын қалай жариялауға болады?
int index = 160434;
### Instruction: C# тілінде 160434 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 160434;
11,188
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 2585.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2585)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 2585. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2585)); }
53,319,423
kk
Python
logic_ops
advanced
Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2081 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
550,775
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 8034.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8034))
### Instruction: Write a function in Python that calculates the factorial of 8034. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8034))
97,085,083
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
770,320
en
C++
var_decl
beginner
How to declare a variable y with value 803832 in C++?
int y = 803832;
### Instruction: How to declare a variable y with value 803832 in C++? ### Response: int y = 803832;
3,614,883
kk
C#
var_decl
beginner
C# тілінде 944016 мәнімен total айнымалысын қалай жариялауға болады?
int total = 944016;
### Instruction: C# тілінде 944016 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 944016;
27,413,609
kk
Java
logic_ops
advanced
Java тилінде 250 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 250; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 250 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 250; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
35,794,164
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; }
564,132
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 853.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(853));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 853. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(853));
45,208,369
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]
20,997
en
Python
var_decl
beginner
How to declare a variable x with value 439399 in Python?
x = 439399
### Instruction: How to declare a variable x with value 439399 in Python? ### Response: x = 439399
4,698,717
en
Python
var_decl
beginner
How to declare a variable size with value 207194 in Python?
size = 207194
### Instruction: How to declare a variable size with value 207194 in Python? ### Response: size = 207194
79,699,450
kk
Java
string_ops
advanced
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,170,040
en
C#
var_decl
beginner
How to declare a variable data with value 245656 in C#?
int data = 245656;
### Instruction: How to declare a variable data with value 245656 in C#? ### Response: int data = 245656;
88,865,659
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2001 високосным.
def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2001 високосным. ### Response: def is_leap(): year = 2001 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
123,107
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 8035.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8035));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 8035. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(8035));
1,948,830
en
Unity
var_decl
beginner
How to declare a variable value with value 304792 in Unity?
int value = 304792;
### Instruction: How to declare a variable value with value 304792 in Unity? ### Response: int value = 304792;
95,281,649
kk
Java
logic_ops
intermediate
Java тилінде 303 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 303; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 303 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 303; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
869,779
en
Unity
var_decl
beginner
How to declare a variable speed with value 721929 in Unity?
int speed = 721929;
### Instruction: How to declare a variable speed with value 721929 in Unity? ### Response: int speed = 721929;
46,909,035
en
Java
logic_ops
intermediate
Write logic to check if the year 1962 is a leap year in Java.
public bool IsLeap() { int y = 1962; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1962 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1962; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,131,931
kk
Python
logic_ops
advanced
Python тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 56 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 56 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 56 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
98,066,416
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; }
4,647,582
kk
C++
var_decl
beginner
C++ тілінде 940989 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 940989;
### Instruction: C++ тілінде 940989 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 940989;
37,610,784
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]
160,694
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 291.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(291)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 291. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(291)); }
33,921,706
kk
Unity
logic_ops
intermediate
Unity тилінде 101 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 101; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 101 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 101; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,200,869
kk
JavaScript
var_decl
beginner
JavaScript тілінде 538818 мәнімен total айнымалысын қалай жариялауға болады?
let total = 538818;
### Instruction: JavaScript тілінде 538818 мәнімен total айнымалысын қалай жариялауға болады? ### Response: let total = 538818;
2,924,670
en
Java
var_decl
beginner
How to declare a variable buffer with value 8078 in Java?
int buffer = 8078;
### Instruction: How to declare a variable buffer with value 8078 in Java? ### Response: int buffer = 8078;
3,705,841
kk
C#
var_decl
beginner
C# тілінде 316845 мәнімен count айнымалысын қалай жариялауға болады?
int count = 316845;
### Instruction: C# тілінде 316845 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 316845;
77,196,281
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
33,136,179
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');