id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
3,606,355
ru
C++
var_decl
beginner
Как объявить переменную total со значением 89927 в C++?
int total = 89927;
### Instruction: Как объявить переменную total со значением 89927 в C++? ### Response: int total = 89927;
2,397,826
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 872118 в Python?
buffer = 872118
### Instruction: Как объявить переменную buffer со значением 872118 в Python? ### Response: buffer = 872118
31,177,910
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(); }
67,449,943
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
78,980,554
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]
37,200,965
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,676,296
en
C++
logic_ops
advanced
Write logic to check if the year 2099 is a leap year in C++.
public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2099 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2099; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,176,496
kk
Java
var_decl
beginner
Java тілінде 672039 мәнімен y айнымалысын қалай жариялауға болады?
int y = 672039;
### Instruction: Java тілінде 672039 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 672039;
193,459
kk
C#
factorial
advanced
C# тілінде 7916 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7916));
### Instruction: C# тілінде 7916 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(7916));
21,051,782
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
3,205,419
en
Unity
var_decl
beginner
How to declare a variable weight with value 987909 in Unity?
int weight = 987909;
### Instruction: How to declare a variable weight with value 987909 in Unity? ### Response: int weight = 987909;
90,580,502
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 405 is prime in JavaScript.
function isPrime() { let n = 405; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 405 is prime in JavaScript. ### Response: function isPrime() { let n = 405; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
15,726,773
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2096 високосным.
public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2096 високосным. ### Response: public bool IsLeap() { int y = 2096; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,185,579
en
C#
var_decl
beginner
How to declare a variable y with value 17879 in C#?
int y = 17879;
### Instruction: How to declare a variable y with value 17879 in C#? ### Response: int y = 17879;
82,883,994
en
Java
logic_ops
advanced
Write logic to check if the year 1979 is a leap year in Java.
public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1979 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1979; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
80,756,028
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; }
47,815,690
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
96,422,981
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
75,253,621
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2060 високосным.
public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2060 високосным. ### Response: public bool IsLeap() { int y = 2060; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
26,466,563
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
42,572,206
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
36,247,475
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
69,974
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 4848.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4848))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 4848. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(4848))
44,173,583
kk
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; }
26,579,821
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
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 Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
70,640,642
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; }
2,839,747
ru
Java
var_decl
beginner
Как объявить переменную data со значением 12245 в Java?
int data = 12245;
### Instruction: Как объявить переменную data со значением 12245 в Java? ### Response: int data = 12245;
3,746,708
ru
Java
var_decl
beginner
Как объявить переменную y со значением 957727 в Java?
int y = 957727;
### Instruction: Как объявить переменную y со значением 957727 в Java? ### Response: int y = 957727;
1,778,660
en
Unity
var_decl
beginner
How to declare a variable score with value 272536 in Unity?
int score = 272536;
### Instruction: How to declare a variable score with value 272536 in Unity? ### Response: int score = 272536;
86,605,190
kk
C#
logic_ops
intermediate
C# тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 17 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 17; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
26,716,475
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);
4,367,405
kk
Python
var_decl
beginner
Python тілінде 584736 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 584736
### Instruction: Python тілінде 584736 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 584736
1,169,530
en
C#
var_decl
beginner
How to declare a variable timer with value 348094 in C#?
int timer = 348094;
### Instruction: How to declare a variable timer with value 348094 in C#? ### Response: int timer = 348094;
1,707,957
en
JavaScript
var_decl
beginner
How to declare a variable x with value 924262 in JavaScript?
let x = 924262;
### Instruction: How to declare a variable x with value 924262 in JavaScript? ### Response: let x = 924262;
56,747
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 9321.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9321)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 9321. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9321)); }
1,549,744
en
Python
var_decl
beginner
How to declare a variable rate with value 222123 in Python?
rate = 222123
### Instruction: How to declare a variable rate with value 222123 in Python? ### Response: rate = 222123
1,262,845
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 565247 in JavaScript?
let offset = 565247;
### Instruction: How to declare a variable offset with value 565247 in JavaScript? ### Response: let offset = 565247;
45,586,156
en
Python
logic_ops
advanced
Write a function that determines if the number 82 is prime in Python.
def is_prime(): n = 82 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 82 is prime in Python. ### Response: def is_prime(): n = 82 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
48,854,019
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);
1,736,808
kk
Unity
var_decl
beginner
Unity тілінде 927670 мәнімен count айнымалысын қалай жариялауға болады?
int count = 927670;
### Instruction: Unity тілінде 927670 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 927670;
3,339,674
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 30130 в JavaScript?
let offset = 30130;
### Instruction: Как объявить переменную offset со значением 30130 в JavaScript? ### Response: let offset = 30130;
39,989,149
ru
Python
array_ops
advanced
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
3,638,555
kk
Unity
var_decl
beginner
Unity тілінде 965478 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 965478;
### Instruction: Unity тілінде 965478 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 965478;
5,268
en
C#
sum_n
intermediate
Write a function in C# that sums numbers from 1 to 653.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(653));
### Instruction: Write a function in C# that sums numbers from 1 to 653. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(653));
4,137,646
kk
C++
var_decl
beginner
C++ тілінде 877015 мәнімен y айнымалысын қалай жариялауға болады?
int y = 877015;
### Instruction: C++ тілінде 877015 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 877015;
309,304
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 901.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(901) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 901. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(901) << std::endl;
20,711,959
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1954 високосным.
function isLeap() { let y = 1954; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1954 високосным. ### Response: function isLeap() { let y = 1954; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
33,601,837
kk
C#
array_ops
advanced
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
40,615,280
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
1,483,076
en
JavaScript
var_decl
beginner
How to declare a variable health with value 826859 in JavaScript?
let health = 826859;
### Instruction: How to declare a variable health with value 826859 in JavaScript? ### Response: let health = 826859;
65,637,593
kk
Java
array_ops
intermediate
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; }
86,418,978
kk
Java
array_ops
advanced
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
58,003,259
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
39,494,651
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 336 простым.
function isPrime() { let n = 336; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 336 простым. ### Response: function isPrime() { let n = 336; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
94,520,057
kk
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; }
290,175
kk
C#
factorial
advanced
C# тілінде 8899 санының факториалын есептейтін функция жаз.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8899));
### Instruction: C# тілінде 8899 санының факториалын есептейтін функция жаз. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8899));
1,875,050
ru
C++
var_decl
beginner
Как объявить переменную amount со значением 410363 в C++?
int amount = 410363;
### Instruction: Как объявить переменную amount со значением 410363 в C++? ### Response: int amount = 410363;
48,301,386
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; }
20,545,107
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('');
81,507,282
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 286 простым.
function isPrime() { let n = 286; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 286 простым. ### Response: function isPrime() { let n = 286; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
155,331
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 5450-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(5450) << std::endl;
### Instruction: C++ тілінде 1-ден 5450-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(5450) << std::endl;
1,493,239
en
C#
var_decl
beginner
How to declare a variable offset with value 827650 in C#?
int offset = 827650;
### Instruction: How to declare a variable offset with value 827650 in C#? ### Response: int offset = 827650;
49,785,294
en
C#
logic_ops
advanced
Write a function that determines if the number 297 is prime in C#.
public bool IsPrime() { int n = 297; 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 297 is prime in C#. ### Response: public bool IsPrime() { int n = 297; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
45,467
kk
JavaScript
factorial
advanced
JavaScript тілінде 597 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(597));
### Instruction: JavaScript тілінде 597 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(597));
45,400,150
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(); }
21,848,811
en
Unity
array_ops
advanced
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; }
42,861,755
kk
C++
string_ops
advanced
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
64,736,226
kk
Unity
logic_ops
advanced
Unity тилінде 1960 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1960; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1960 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1960; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
71,456,554
en
Unity
array_ops
intermediate
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; }
46,828,172
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1911; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1911; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
11,954,039
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аеёиоуыэюя')
50,763,151
kk
C++
logic_ops
advanced
C++ тилінде 207 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 207; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 207 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 207; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
156,094
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 873.
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(873) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 873. ### 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(873) << std::endl;
99,492,517
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
2,984,509
ru
C#
var_decl
beginner
Как объявить переменную score со значением 597463 в C#?
int score = 597463;
### Instruction: Как объявить переменную score со значением 597463 в C#? ### Response: int score = 597463;
702,282
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3544-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3544)); }
### Instruction: Unity тілінде 1-ден 3544-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3544)); }
4,338,972
kk
C++
var_decl
beginner
C++ тілінде 599000 мәнімен result айнымалысын қалай жариялауға болады?
int result = 599000;
### Instruction: C++ тілінде 599000 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 599000;
23,743,361
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; }
370,721
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 2054.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2054))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 2054. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2054))
4,546,805
en
C++
var_decl
beginner
How to declare a variable limit with value 900203 in C++?
int limit = 900203;
### Instruction: How to declare a variable limit with value 900203 in C++? ### Response: int limit = 900203;
33,710
kk
C#
sum_n
intermediate
C# тілінде 1-ден 7544-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7544));
### Instruction: C# тілінде 1-ден 7544-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7544));
79,832,615
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1914; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1914; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
1,564,823
ru
Python
var_decl
beginner
Как объявить переменную data со значением 347348 в Python?
data = 347348
### Instruction: Как объявить переменную data со значением 347348 в Python? ### Response: data = 347348
511,468
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 2828.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2828))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 2828. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2828))
30,172,169
en
Java
logic_ops
intermediate
Write a function that determines if the number 31 is prime in Java.
public bool IsPrime() { int n = 31; 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 31 is prime in Java. ### Response: public bool IsPrime() { int n = 31; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
70,097,793
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(); }
4,295,009
kk
C#
var_decl
beginner
C# тілінде 380622 мәнімен count айнымалысын қалай жариялауға болады?
int count = 380622;
### Instruction: C# тілінде 380622 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 380622;
3,202,228
en
C#
var_decl
beginner
How to declare a variable weight with value 55695 in C#?
int weight = 55695;
### Instruction: How to declare a variable weight with value 55695 in C#? ### Response: int weight = 55695;
4,894,610
en
Unity
var_decl
beginner
How to declare a variable total with value 113298 in Unity?
int total = 113298;
### Instruction: How to declare a variable total with value 113298 in Unity? ### Response: int total = 113298;
4,821,163
en
JavaScript
var_decl
beginner
How to declare a variable result with value 241976 in JavaScript?
let result = 241976;
### Instruction: How to declare a variable result with value 241976 in JavaScript? ### Response: let result = 241976;
50,623,326
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; }
86,720,000
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; }
1,971,622
ru
C#
var_decl
beginner
Как объявить переменную level со значением 515541 в C#?
int level = 515541;
### Instruction: Как объявить переменную level со значением 515541 в C#? ### Response: int level = 515541;
4,460,281
kk
Unity
var_decl
beginner
Unity тілінде 928296 мәнімен index айнымалысын қалай жариялауға болады?
int index = 928296;
### Instruction: Unity тілінде 928296 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 928296;
3,859,038
kk
C++
var_decl
beginner
C++ тілінде 365670 мәнімен size айнымалысын қалай жариялауға болады?
int size = 365670;
### Instruction: C++ тілінде 365670 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 365670;
81,126,187
en
Python
logic_ops
intermediate
Write a function that determines if the number 263 is prime in Python.
def is_prime(): n = 263 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 263 is prime in Python. ### Response: def is_prime(): n = 263 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
13,400,297
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 122 простым.
function isPrime() { let n = 122; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 122 простым. ### Response: function isPrime() { let n = 122; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,750,350
en
C#
var_decl
beginner
How to declare a variable index with value 249387 in C#?
int index = 249387;
### Instruction: How to declare a variable index with value 249387 in C#? ### Response: int index = 249387;
430,188
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 2777.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2777) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 2777. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2777) << std::endl;
2,134,117
kk
C#
var_decl
beginner
C# тілінде 998907 мәнімен x айнымалысын қалай жариялауға болады?
int x = 998907;
### Instruction: C# тілінде 998907 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 998907;