id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
3,017,878
en
C#
var_decl
beginner
How to declare a variable offset with value 95828 in C#?
int offset = 95828;
### Instruction: How to declare a variable offset with value 95828 in C#? ### Response: int offset = 95828;
33,399,086
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; }
59,187,720
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; }
3,767,562
kk
JavaScript
var_decl
beginner
JavaScript тілінде 812115 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 812115;
### Instruction: JavaScript тілінде 812115 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 812115;
63,415,660
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 224 простым.
function isPrime() { let n = 224; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 224 простым. ### Response: function isPrime() { let n = 224; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
42,320,811
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; }
15,723,364
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1933 високосным.
public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1933 високосным. ### Response: public bool IsLeap() { int y = 1933; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,263,283
en
JavaScript
var_decl
beginner
How to declare a variable total with value 121962 in JavaScript?
let total = 121962;
### Instruction: How to declare a variable total with value 121962 in JavaScript? ### Response: let total = 121962;
4,142,221
kk
Unity
var_decl
beginner
Unity тілінде 753921 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 753921;
### Instruction: Unity тілінде 753921 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 753921;
638,878
kk
Python
sum_n
intermediate
Python тілінде 1-ден 8581-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8581))
### Instruction: Python тілінде 1-ден 8581-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8581))
2,545,582
en
JavaScript
var_decl
beginner
How to declare a variable score with value 499536 in JavaScript?
let score = 499536;
### Instruction: How to declare a variable score with value 499536 in JavaScript? ### Response: let score = 499536;
3,562,608
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 294293 в C#?
int buffer = 294293;
### Instruction: Как объявить переменную buffer со значением 294293 в C#? ### Response: int buffer = 294293;
1,529,489
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 499070 in JavaScript?
let speed = 499070;
### Instruction: How to declare a variable speed with value 499070 in JavaScript? ### Response: let speed = 499070;
66,134,531
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 279 простым.
public bool IsPrime() { int n = 279; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 279 простым. ### Response: public bool IsPrime() { int n = 279; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,356,381
kk
Python
var_decl
beginner
Python тілінде 647840 мәнімен speed айнымалысын қалай жариялауға болады?
speed = 647840
### Instruction: Python тілінде 647840 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: speed = 647840
33,653,497
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
32,470,328
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 431 простым.
public bool IsPrime() { int n = 431; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 431 простым. ### Response: public bool IsPrime() { int n = 431; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
43,094,506
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
58,399,805
en
Python
logic_ops
intermediate
Write a function that determines if the number 164 is prime in Python.
def is_prime(): n = 164 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 164 is prime in Python. ### Response: def is_prime(): n = 164 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,054,100
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 778289 in JavaScript?
let rate = 778289;
### Instruction: How to declare a variable rate with value 778289 in JavaScript? ### Response: let rate = 778289;
2,555,524
kk
Unity
var_decl
beginner
Unity тілінде 706290 мәнімен health айнымалысын қалай жариялауға болады?
int health = 706290;
### Instruction: Unity тілінде 706290 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 706290;
67,776,592
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; }
837,686
en
JavaScript
var_decl
beginner
How to declare a variable total with value 530059 in JavaScript?
let total = 530059;
### Instruction: How to declare a variable total with value 530059 in JavaScript? ### Response: let total = 530059;
82,542,155
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
45,676,883
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 287 простым.
public bool IsPrime() { int n = 287; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 287 простым. ### Response: public bool IsPrime() { int n = 287; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,710,284
ru
Java
var_decl
beginner
Как объявить переменную level со значением 728394 в Java?
int level = 728394;
### Instruction: Как объявить переменную level со значением 728394 в Java? ### Response: int level = 728394;
1,859,399
en
Python
var_decl
beginner
How to declare a variable rate with value 589070 in Python?
rate = 589070
### Instruction: How to declare a variable rate with value 589070 in Python? ### Response: rate = 589070
27,109,990
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
4,893,332
ru
C++
var_decl
beginner
Как объявить переменную data со значением 799758 в C++?
int data = 799758;
### Instruction: Как объявить переменную data со значением 799758 в C++? ### Response: int data = 799758;
95,342,327
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая считает количество гласных букв в тексте.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Напишите на Python функцию, которая считает количество гласных букв в тексте. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
3,871,028
ru
Python
var_decl
beginner
Как объявить переменную count со значением 411781 в Python?
count = 411781
### Instruction: Как объявить переменную count со значением 411781 в Python? ### Response: count = 411781
5,626
kk
Python
func_def
intermediate
Python тілінде y қабылдап, оны екі еселейтін transform функциясын жаз.
def transform(y): return y * 2
### Instruction: Python тілінде y қабылдап, оны екі еселейтін transform функциясын жаз. ### Response: def transform(y): return y * 2
82,460,231
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
98,693,409
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; }
4,130,094
en
C++
var_decl
beginner
How to declare a variable index with value 759087 in C++?
int index = 759087;
### Instruction: How to declare a variable index with value 759087 in C++? ### Response: int index = 759087;
63,360,466
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; }
99,018,798
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
93,699,747
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; }
1,094,772
en
C#
var_decl
beginner
How to declare a variable limit with value 742594 in C#?
int limit = 742594;
### Instruction: How to declare a variable limit with value 742594 in C#? ### Response: int limit = 742594;
845,588
kk
Python
var_decl
beginner
Python тілінде 698896 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 698896
### Instruction: Python тілінде 698896 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 698896
3,258,013
kk
Python
var_decl
beginner
Python тілінде 412940 мәнімен value айнымалысын қалай жариялауға болады?
value = 412940
### Instruction: Python тілінде 412940 мәнімен value айнымалысын қалай жариялауға болады? ### Response: value = 412940
30,325,853
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 354 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 354; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 354 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 354; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
12,798,565
kk
Java
logic_ops
intermediate
Java тилінде 219 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 219; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 219 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 219; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,889,060
ru
C#
var_decl
beginner
Как объявить переменную value со значением 748921 в C#?
int value = 748921;
### Instruction: Как объявить переменную value со значением 748921 в C#? ### Response: int value = 748921;
4,165,395
en
Python
var_decl
beginner
How to declare a variable limit with value 13941 in Python?
limit = 13941
### Instruction: How to declare a variable limit with value 13941 in Python? ### Response: limit = 13941
4,204,466
kk
Java
var_decl
beginner
Java тілінде 348909 мәнімен data айнымалысын қалай жариялауға болады?
int data = 348909;
### Instruction: Java тілінде 348909 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 348909;
31,754,854
en
Unity
logic_ops
intermediate
Write logic to check if the year 1956 is a leap year in Unity.
public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1956 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1956; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
29,891,858
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
25,035,289
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
69,393,855
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
3,602,056
kk
Python
var_decl
beginner
Python тілінде 527487 мәнімен index айнымалысын қалай жариялауға болады?
index = 527487
### Instruction: Python тілінде 527487 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 527487
19,919,840
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
735,295
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 9621.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9621));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 9621. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9621));
93,154,029
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
1,376,090
en
Python
var_decl
beginner
How to declare a variable weight with value 921645 in Python?
weight = 921645
### Instruction: How to declare a variable weight with value 921645 in Python? ### Response: weight = 921645
2,839,858
ru
Java
var_decl
beginner
Как объявить переменную score со значением 476674 в Java?
int score = 476674;
### Instruction: Как объявить переменную score со значением 476674 в Java? ### Response: int score = 476674;
29,329,586
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(); }
4,805,236
ru
Python
var_decl
beginner
Как объявить переменную timer со значением 43348 в Python?
timer = 43348
### Instruction: Как объявить переменную timer со значением 43348 в Python? ### Response: timer = 43348
3,544,453
kk
C#
var_decl
beginner
C# тілінде 257389 мәнімен result айнымалысын қалай жариялауға болады?
int result = 257389;
### Instruction: C# тілінде 257389 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 257389;
14,359,970
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
1,130,602
kk
JavaScript
var_decl
beginner
JavaScript тілінде 586143 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 586143;
### Instruction: JavaScript тілінде 586143 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 586143;
2,388,366
en
Python
var_decl
beginner
How to declare a variable level with value 454522 in Python?
level = 454522
### Instruction: How to declare a variable level with value 454522 in Python? ### Response: level = 454522
4,015,412
kk
C#
var_decl
beginner
C# тілінде 426625 мәнімен y айнымалысын қалай жариялауға болады?
int y = 426625;
### Instruction: C# тілінде 426625 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 426625;
59,487,545
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; }
3,361,408
ru
C++
var_decl
beginner
Как объявить переменную data со значением 427343 в C++?
int data = 427343;
### Instruction: Как объявить переменную data со значением 427343 в C++? ### Response: int data = 427343;
56,421,959
en
C#
logic_ops
advanced
Write a function that determines if the number 102 is prime in C#.
public bool IsPrime() { int n = 102; 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 102 is prime in C#. ### Response: public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,038,519
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 581182 в Python?
weight = 581182
### Instruction: Как объявить переменную weight со значением 581182 в Python? ### Response: weight = 581182
2,722,760
en
C#
var_decl
beginner
How to declare a variable data with value 84454 in C#?
int data = 84454;
### Instruction: How to declare a variable data with value 84454 in C#? ### Response: int data = 84454;
452,788
kk
Java
factorial
advanced
Java тілінде 4803 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4803));
### Instruction: Java тілінде 4803 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4803));
84,721,380
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 283 простым.
public bool IsPrime() { int n = 283; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 283 простым. ### Response: public bool IsPrime() { int n = 283; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
15,118,956
en
Python
logic_ops
intermediate
Write logic to check if the year 1923 is a leap year in Python.
def is_leap(): year = 1923 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1923 is a leap year in Python. ### Response: def is_leap(): year = 1923 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
86,745,255
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; }
37,765,504
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая фильтрует только четные числа из списка.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Напишите на Python функцию, которая фильтрует только четные числа из списка. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
83,843,390
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
3,599,979
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 80832 в Unity?
int size = 80832;
### Instruction: Как объявить переменную size со значением 80832 в Unity? ### Response: int size = 80832;
1,870,923
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 329754 в Unity?
int level = 329754;
### Instruction: Как объявить переменную level со значением 329754 в Unity? ### Response: int level = 329754;
99,203,105
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2069 is a leap year in JavaScript.
function isLeap() { let y = 2069; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2069 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2069; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
62,290,780
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,517,272
kk
Python
var_decl
beginner
Python тілінде 102998 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 102998
### Instruction: Python тілінде 102998 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 102998
73,080,185
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 200 простым.
public bool IsPrime() { int n = 200; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 200 простым. ### Response: public bool IsPrime() { int n = 200; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
34,456,211
ru
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; }
54,700,797
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1902 високосным.
public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1902 високосным. ### Response: public bool IsLeap() { int y = 1902; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,793,083
kk
C#
var_decl
beginner
C# тілінде 501379 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 501379;
### Instruction: C# тілінде 501379 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 501379;
71,411,355
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,924,894
kk
C#
var_decl
beginner
C# тілінде 58400 мәнімен x айнымалысын қалай жариялауға болады?
int x = 58400;
### Instruction: C# тілінде 58400 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 58400;
4,137,082
ru
Java
var_decl
beginner
Как объявить переменную offset со значением 905268 в Java?
int offset = 905268;
### Instruction: Как объявить переменную offset со значением 905268 в Java? ### Response: int offset = 905268;
3,679,966
en
Unity
var_decl
beginner
How to declare a variable speed with value 87046 in Unity?
int speed = 87046;
### Instruction: How to declare a variable speed with value 87046 in Unity? ### Response: int speed = 87046;
63,520,171
kk
Java
logic_ops
intermediate
Java тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 144 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 144; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
57,871,774
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]
3,928,011
en
C#
var_decl
beginner
How to declare a variable value with value 73573 in C#?
int value = 73573;
### Instruction: How to declare a variable value with value 73573 in C#? ### Response: int value = 73573;
54,736,163
kk
Unity
logic_ops
intermediate
Unity тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 102 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 102; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
36,874,258
en
Java
logic_ops
advanced
Write a function that determines if the number 237 is prime in Java.
public bool IsPrime() { int n = 237; 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 237 is prime in Java. ### Response: public bool IsPrime() { int n = 237; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,045,718
kk
Java
var_decl
beginner
Java тілінде 770265 мәнімен count айнымалысын қалай жариялауға болады?
int count = 770265;
### Instruction: Java тілінде 770265 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 770265;
3,589,973
en
Java
var_decl
beginner
How to declare a variable data with value 587441 in Java?
int data = 587441;
### Instruction: How to declare a variable data with value 587441 in Java? ### Response: int data = 587441;
931,016
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 701601 в Unity?
int rate = 701601;
### Instruction: Как объявить переменную rate со значением 701601 в Unity? ### Response: int rate = 701601;
274,279
kk
Unity
factorial
advanced
Unity тілінде 3003 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3003)); }
### Instruction: Unity тілінде 3003 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3003)); }
3,187,416
en
C++
var_decl
beginner
How to declare a variable total with value 114674 in C++?
int total = 114674;
### Instruction: How to declare a variable total with value 114674 in C++? ### Response: int total = 114674;
1,676,245
ru
JavaScript
var_decl
beginner
Как объявить переменную rate со значением 635947 в JavaScript?
let rate = 635947;
### Instruction: Как объявить переменную rate со значением 635947 в JavaScript? ### Response: let rate = 635947;
95,850,222
kk
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; }
52,705,784
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1992 високосным.
function isLeap() { let y = 1992; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1992 високосным. ### Response: function isLeap() { let y = 1992; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }