id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
4,346,930
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 815916 в Unity?
int timer = 815916;
### Instruction: Как объявить переменную timer со значением 815916 в Unity? ### Response: int timer = 815916;
2,542,225
en
Java
var_decl
beginner
How to declare a variable weight with value 998207 in Java?
int weight = 998207;
### Instruction: How to declare a variable weight with value 998207 in Java? ### Response: int weight = 998207;
4,460,368
en
Python
var_decl
beginner
How to declare a variable health with value 691742 in Python?
health = 691742
### Instruction: How to declare a variable health with value 691742 in Python? ### Response: health = 691742
620,233
en
Unity
var_decl
beginner
How to declare a variable data with value 178424 in Unity?
int data = 178424;
### Instruction: How to declare a variable data with value 178424 in Unity? ### Response: int data = 178424;
50,255,996
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 449 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 449; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 449 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 449; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
88,004,371
en
JavaScript
array_ops
intermediate
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();
2,708,273
kk
Python
var_decl
beginner
Python тілінде 123328 мәнімен buffer айнымалысын қалай жариялауға болады?
buffer = 123328
### Instruction: Python тілінде 123328 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: buffer = 123328
819,406
en
Unity
var_decl
beginner
How to declare a variable level with value 18339 in Unity?
int level = 18339;
### Instruction: How to declare a variable level with value 18339 in Unity? ### Response: int level = 18339;
15,265,826
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
94,658,319
en
Java
logic_ops
advanced
Write a function that determines if the number 329 is prime in Java.
public bool IsPrime() { int n = 329; 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 329 is prime in Java. ### Response: public bool IsPrime() { int n = 329; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,655,634
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; }
45,661,020
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(); }
90,974,200
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; }
39,625,373
kk
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; }
70,458,545
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,233,018
en
JavaScript
var_decl
beginner
How to declare a variable value with value 366852 in JavaScript?
let value = 366852;
### Instruction: How to declare a variable value with value 366852 in JavaScript? ### Response: let value = 366852;
3,339,417
ru
JavaScript
var_decl
beginner
Как объявить переменную health со значением 955382 в JavaScript?
let health = 955382;
### Instruction: Как объявить переменную health со значением 955382 в JavaScript? ### Response: let health = 955382;
47,995,437
kk
C#
array_ops
intermediate
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,292,531
kk
Unity
var_decl
beginner
Unity тілінде 27969 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 27969;
### Instruction: Unity тілінде 27969 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 27969;
59,206,657
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1946 високосным.
public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1946 високосным. ### Response: public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
37,399,733
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; }
50,069,713
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 164 простым.
public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 164 простым. ### Response: public bool IsPrime() { int n = 164; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,721,168
ru
Python
logic_ops
intermediate
Напишите на 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)
1,541,618
ru
Unity
var_decl
beginner
Как объявить переменную rate со значением 59946 в Unity?
int rate = 59946;
### Instruction: Как объявить переменную rate со значением 59946 в Unity? ### Response: int rate = 59946;
57,277,000
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
84,583,006
kk
Python
logic_ops
advanced
Python тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2017 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2017 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2017 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,787,660
en
C++
var_decl
beginner
How to declare a variable level with value 14983 in C++?
int level = 14983;
### Instruction: How to declare a variable level with value 14983 in C++? ### Response: int level = 14983;
1,734,446
kk
Java
var_decl
beginner
Java тілінде 881039 мәнімен count айнымалысын қалай жариялауға болады?
int count = 881039;
### Instruction: Java тілінде 881039 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 881039;
639,415
kk
C++
factorial
advanced
C++ тілінде 9823 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9823) << std::endl;
### Instruction: C++ тілінде 9823 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(9823) << std::endl;
68,240,686
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; }
80,098,350
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 413 простым.
public bool IsPrime() { int n = 413; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 413 простым. ### Response: public bool IsPrime() { int n = 413; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,344,349
en
C++
var_decl
beginner
How to declare a variable rate with value 533553 in C++?
int rate = 533553;
### Instruction: How to declare a variable rate with value 533553 in C++? ### Response: int rate = 533553;
84,286
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 6038.
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(6038) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 6038. ### 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(6038) << std::endl;
52,404,620
ru
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); }
12,908,958
en
JavaScript
string_ops
intermediate
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
95,261,000
en
C++
logic_ops
intermediate
Write logic to check if the year 2034 is a leap year in C++.
public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2034 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,467,423
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1981 високосным.
def is_leap(): year = 1981 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1981 високосным. ### Response: def is_leap(): year = 1981 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
85,258,742
en
Python
string_ops
advanced
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аеёиоуыэюя')
4,739,517
en
JavaScript
var_decl
beginner
How to declare a variable result with value 646400 in JavaScript?
let result = 646400;
### Instruction: How to declare a variable result with value 646400 in JavaScript? ### Response: let result = 646400;
33,399,813
ru
Java
string_ops
intermediate
Напишите на 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; }
243,970
kk
Python
factorial
advanced
Python тілінде 3327 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3327))
### Instruction: Python тілінде 3327 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(3327))
746,193
kk
Java
factorial
advanced
Java тілінде 6460 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6460));
### Instruction: Java тілінде 6460 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6460));
2,714,636
en
JavaScript
var_decl
beginner
How to declare a variable buffer with value 860515 in JavaScript?
let buffer = 860515;
### Instruction: How to declare a variable buffer with value 860515 in JavaScript? ### Response: let buffer = 860515;
13,527,735
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]
87,453,592
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; }
3,481,508
en
Java
var_decl
beginner
How to declare a variable level with value 170362 in Java?
int level = 170362;
### Instruction: How to declare a variable level with value 170362 in Java? ### Response: int level = 170362;
3,090,260
ru
Unity
var_decl
beginner
Как объявить переменную limit со значением 336110 в Unity?
int limit = 336110;
### Instruction: Как объявить переменную limit со значением 336110 в Unity? ### Response: int limit = 336110;
93,295,917
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2063 високосным.
public bool IsLeap() { int y = 2063; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2063 високосным. ### Response: public bool IsLeap() { int y = 2063; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,651,235
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1924 високосным.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1924 високосным. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,992,544
en
Unity
var_decl
beginner
How to declare a variable data with value 400803 in Unity?
int data = 400803;
### Instruction: How to declare a variable data with value 400803 in Unity? ### Response: int data = 400803;
90,664,996
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; }
4,824,030
en
JavaScript
var_decl
beginner
How to declare a variable result with value 580303 in JavaScript?
let result = 580303;
### Instruction: How to declare a variable result with value 580303 in JavaScript? ### Response: let result = 580303;
57,172,253
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
12,726,310
en
Java
array_ops
advanced
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
540,961
en
Unity
var_decl
beginner
How to declare a variable rate with value 298474 in Unity?
int rate = 298474;
### Instruction: How to declare a variable rate with value 298474 in Unity? ### Response: int rate = 298474;
1,213,884
kk
Python
var_decl
beginner
Python тілінде 449568 мәнімен size айнымалысын қалай жариялауға болады?
size = 449568
### Instruction: Python тілінде 449568 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 449568
4,670,662
kk
C#
var_decl
beginner
C# тілінде 999298 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 999298;
### Instruction: C# тілінде 999298 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 999298;
424,886
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 1078.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1078))
### Instruction: Write a function in Python that sums numbers from 1 to 1078. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1078))
2,728,042
ru
C#
var_decl
beginner
Как объявить переменную y со значением 543117 в C#?
int y = 543117;
### Instruction: Как объявить переменную y со значением 543117 в C#? ### Response: int y = 543117;
58,902,437
kk
Python
logic_ops
intermediate
Python тилінде 402 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 402 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 402 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 402 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
4,475,151
kk
Python
var_decl
beginner
Python тілінде 361908 мәнімен y айнымалысын қалай жариялауға болады?
y = 361908
### Instruction: Python тілінде 361908 мәнімен y айнымалысын қалай жариялауға болады? ### Response: y = 361908
64,638,624
ru
Unity
array_ops
intermediate
Напишите на 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,908,036
en
JavaScript
var_decl
beginner
How to declare a variable total with value 115074 in JavaScript?
let total = 115074;
### Instruction: How to declare a variable total with value 115074 in JavaScript? ### Response: let total = 115074;
4,216,372
en
Java
var_decl
beginner
How to declare a variable score with value 951388 in Java?
int score = 951388;
### Instruction: How to declare a variable score with value 951388 in Java? ### Response: int score = 951388;
1,174,225
en
Unity
var_decl
beginner
How to declare a variable score with value 766025 in Unity?
int score = 766025;
### Instruction: How to declare a variable score with value 766025 in Unity? ### Response: int score = 766025;
4,923,994
en
Unity
var_decl
beginner
How to declare a variable offset with value 426549 in Unity?
int offset = 426549;
### Instruction: How to declare a variable offset with value 426549 in Unity? ### Response: int offset = 426549;
3,792,641
en
C++
var_decl
beginner
How to declare a variable score with value 282989 in C++?
int score = 282989;
### Instruction: How to declare a variable score with value 282989 in C++? ### Response: int score = 282989;
3,554,688
ru
Java
var_decl
beginner
Как объявить переменную total со значением 724096 в Java?
int total = 724096;
### Instruction: Как объявить переменную total со значением 724096 в Java? ### Response: int total = 724096;
907,116
ru
C#
var_decl
beginner
Как объявить переменную rate со значением 944715 в C#?
int rate = 944715;
### Instruction: Как объявить переменную rate со значением 944715 в C#? ### Response: int rate = 944715;
89,254,722
en
JavaScript
string_ops
advanced
Write a function that converts a string to uppercase in JavaScript.
const toUpper = s => s.toUpperCase();
### Instruction: Write a function that converts a string to uppercase in JavaScript. ### Response: const toUpper = s => s.toUpperCase();
4,258,668
ru
Java
var_decl
beginner
Как объявить переменную total со значением 224045 в Java?
int total = 224045;
### Instruction: Как объявить переменную total со значением 224045 в Java? ### Response: int total = 224045;
61,494,849
en
Python
logic_ops
advanced
Write logic to check if the year 1932 is a leap year in Python.
def is_leap(): year = 1932 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1932 is a leap year in Python. ### Response: def is_leap(): year = 1932 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
31,805,134
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
51,906,227
kk
Java
array_ops
advanced
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
23,564,813
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; }
272,583
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 1841.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1841)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 1841. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1841)); }
2,473,115
kk
JavaScript
var_decl
beginner
JavaScript тілінде 720123 мәнімен score айнымалысын қалай жариялауға болады?
let score = 720123;
### Instruction: JavaScript тілінде 720123 мәнімен score айнымалысын қалай жариялауға болады? ### Response: let score = 720123;
95,158,773
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1958 високосным.
public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1958 високосным. ### Response: public bool IsLeap() { int y = 1958; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
303,476
kk
C#
var_decl
beginner
C# тілінде 606930 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 606930;
### Instruction: C# тілінде 606930 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 606930;
38,506,506
kk
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; }
790,692
en
Python
var_decl
beginner
How to declare a variable data with value 906740 in Python?
data = 906740
### Instruction: How to declare a variable data with value 906740 in Python? ### Response: data = 906740
1,452,593
ru
Java
var_decl
beginner
Как объявить переменную value со значением 930840 в Java?
int value = 930840;
### Instruction: Как объявить переменную value со значением 930840 в Java? ### Response: int value = 930840;
1,226,172
en
Java
var_decl
beginner
How to declare a variable result with value 587606 in Java?
int result = 587606;
### Instruction: How to declare a variable result with value 587606 in Java? ### Response: int result = 587606;
374,250
kk
C#
var_decl
beginner
C# тілінде 545145 мәнімен size айнымалысын қалай жариялауға болады?
int size = 545145;
### Instruction: C# тілінде 545145 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 545145;
2,135,472
kk
C++
var_decl
beginner
C++ тілінде 62830 мәнімен index айнымалысын қалай жариялауға болады?
int index = 62830;
### Instruction: C++ тілінде 62830 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 62830;
27,186,220
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,240,615
kk
C++
var_decl
beginner
C++ тілінде 172137 мәнімен data айнымалысын қалай жариялауға болады?
int data = 172137;
### Instruction: C++ тілінде 172137 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 172137;
87,290,321
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
99,994,048
kk
Python
logic_ops
intermediate
Python тилінде 372 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 372 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
74,577,152
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
41,111,339
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1910 високосным.
def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1910 високосным. ### Response: def is_leap(): year = 1910 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
61,912,106
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; }
87,579,600
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 123; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 123 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 123; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
46,463,687
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; }
48,857,092
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
87,655,348
kk
Unity
logic_ops
intermediate
Unity тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1953 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1953; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
39,483,466
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; }
1,633,198
en
JavaScript
var_decl
beginner
How to declare a variable value with value 770040 in JavaScript?
let value = 770040;
### Instruction: How to declare a variable value with value 770040 in JavaScript? ### Response: let value = 770040;
99,530,360
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
1,691,509
en
Java
var_decl
beginner
How to declare a variable y with value 984263 in Java?
int y = 984263;
### Instruction: How to declare a variable y with value 984263 in Java? ### Response: int y = 984263;