id
int64
0
100M
language
stringclasses
3 values
prog_lang
stringclasses
6 values
category
stringclasses
10 values
difficulty
stringclasses
3 values
instruction
stringlengths
30
86
output
stringlengths
7
192
text
stringlengths
92
300
453,628
en
Python
var_decl
beginner
How to declare a variable index with value 234230 in Python?
index = 234230
### Instruction: How to declare a variable index with value 234230 in Python? ### Response: index = 234230
3,693,647
en
Unity
var_decl
beginner
How to declare a variable weight with value 859707 in Unity?
int weight = 859707;
### Instruction: How to declare a variable weight with value 859707 in Unity? ### Response: int weight = 859707;
4,033,271
en
Unity
var_decl
beginner
How to declare a variable y with value 735078 in Unity?
int y = 735078;
### Instruction: How to declare a variable y with value 735078 in Unity? ### Response: int y = 735078;
4,619,884
kk
Java
var_decl
beginner
Java тілінде 977168 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 977168;
### Instruction: Java тілінде 977168 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 977168;
54,179,440
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); }
25,833,034
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
65,119,079
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; }
551,037
kk
Java
factorial
advanced
Java тілінде 429 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(429));
### Instruction: Java тілінде 429 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(429));
63,034,599
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; }
2,163,750
en
C#
var_decl
beginner
How to declare a variable timer with value 267906 in C#?
int timer = 267906;
### Instruction: How to declare a variable timer with value 267906 in C#? ### Response: int timer = 267906;
32,181,949
kk
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]
79,835,266
en
C#
logic_ops
intermediate
Write logic to check if the year 1993 is a leap year in C#.
public bool IsLeap() { int y = 1993; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1993 is a leap year in C#. ### Response: public bool IsLeap() { int y = 1993; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,687,750
ru
C++
var_decl
beginner
Как объявить переменную data со значением 316018 в C++?
int data = 316018;
### Instruction: Как объявить переменную data со значением 316018 в C++? ### Response: int data = 316018;
266,520
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 6099-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(6099) << std::endl;
### Instruction: C++ тілінде 1-ден 6099-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(6099) << std::endl;
81,623,401
en
C#
logic_ops
intermediate
Write a function that determines if the number 54 is prime in C#.
public bool IsPrime() { int n = 54; 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 54 is prime in C#. ### Response: public bool IsPrime() { int n = 54; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
224,818
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 3378-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(3378) << std::endl;
### Instruction: C++ тілінде 1-ден 3378-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(3378) << std::endl;
4,035,204
kk
C++
var_decl
beginner
C++ тілінде 121967 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 121967;
### Instruction: C++ тілінде 121967 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 121967;
25,571,908
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2054 високосным.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2054 високосным. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,089,401
kk
C++
var_decl
beginner
C++ тілінде 954460 мәнімен count айнымалысын қалай жариялауға болады?
int count = 954460;
### Instruction: C++ тілінде 954460 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 954460;
1,178,747
kk
C#
var_decl
beginner
C# тілінде 563193 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 563193;
### Instruction: C# тілінде 563193 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 563193;
98,041,284
en
Unity
logic_ops
advanced
Write logic to check if the year 2010 is a leap year in Unity.
public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2010 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2010; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
919,911
en
JavaScript
var_decl
beginner
How to declare a variable health with value 255844 in JavaScript?
let health = 255844;
### Instruction: How to declare a variable health with value 255844 in JavaScript? ### Response: let health = 255844;
4,315,479
en
JavaScript
var_decl
beginner
How to declare a variable result with value 485433 in JavaScript?
let result = 485433;
### Instruction: How to declare a variable result with value 485433 in JavaScript? ### Response: let result = 485433;
1,484,708
kk
C#
var_decl
beginner
C# тілінде 373957 мәнімен size айнымалысын қалай жариялауға болады?
int size = 373957;
### Instruction: C# тілінде 373957 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 373957;
70,116,896
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; }
43,087,176
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 245 простым.
def is_prime(): n = 245 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 245 простым. ### Response: def is_prime(): n = 245 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
66,416,679
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);
45,315,225
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 457 простым.
public bool IsPrime() { int n = 457; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 457 простым. ### Response: public bool IsPrime() { int n = 457; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,431,579
kk
Python
var_decl
beginner
Python тілінде 494783 мәнімен total айнымалысын қалай жариялауға болады?
total = 494783
### Instruction: Python тілінде 494783 мәнімен total айнымалысын қалай жариялауға болады? ### Response: total = 494783
4,786,570
kk
Python
var_decl
beginner
Python тілінде 348494 мәнімен score айнымалысын қалай жариялауға болады?
score = 348494
### Instruction: Python тілінде 348494 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 348494
98,563,113
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1968 високосным.
public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1968 високосным. ### Response: public bool IsLeap() { int y = 1968; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
73,147,461
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; }
37,948,609
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1952 is a leap year in JavaScript.
function isLeap() { let y = 1952; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1952 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1952; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
46,109,724
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 419 простым.
public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 419 простым. ### Response: public bool IsPrime() { int n = 419; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
42,126,487
ru
Java
string_ops
advanced
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Java функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,658,685
en
C#
var_decl
beginner
How to declare a variable x with value 823907 in C#?
int x = 823907;
### Instruction: How to declare a variable x with value 823907 in C#? ### Response: int x = 823907;
3,278,741
en
C#
var_decl
beginner
How to declare a variable value with value 580714 in C#?
int value = 580714;
### Instruction: How to declare a variable value with value 580714 in C#? ### Response: int value = 580714;
41,207,989
kk
C#
logic_ops
advanced
C# тилінде 206 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 206; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 206 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 206; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,441,482
en
C#
var_decl
beginner
How to declare a variable size with value 829020 in C#?
int size = 829020;
### Instruction: How to declare a variable size with value 829020 in C#? ### Response: int size = 829020;
82,828,023
en
Unity
logic_ops
advanced
Write logic to check if the year 2094 is a leap year in Unity.
public bool IsLeap() { int y = 2094; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2094 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2094; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,618,897
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; }
63,519,282
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; }
4,103,831
en
C++
var_decl
beginner
How to declare a variable index with value 328846 in C++?
int index = 328846;
### Instruction: How to declare a variable index with value 328846 in C++? ### Response: int index = 328846;
62,941,472
en
C++
string_ops
intermediate
Write a function that checks if a string is a palindrome in C++.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C++. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,575,394
en
Python
var_decl
beginner
How to declare a variable speed with value 863314 in Python?
speed = 863314
### Instruction: How to declare a variable speed with value 863314 in Python? ### Response: speed = 863314
63,935,718
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
80,698,710
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1938 is a leap year in JavaScript.
function isLeap() { let y = 1938; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1938 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1938; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
97,261,740
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
4,157,894
en
Python
var_decl
beginner
How to declare a variable speed with value 420858 in Python?
speed = 420858
### Instruction: How to declare a variable speed with value 420858 in Python? ### Response: speed = 420858
23,283,439
kk
Java
logic_ops
intermediate
Java тилінде 223 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 223; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 223 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 223; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
80,711,473
en
JavaScript
logic_ops
advanced
Write a function that determines if the number 458 is prime in JavaScript.
function isPrime() { let n = 458; 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 458 is prime in JavaScript. ### Response: function isPrime() { let n = 458; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
83,164,289
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1926 високосным.
public bool IsLeap() { int y = 1926; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1926 високосным. ### Response: public bool IsLeap() { int y = 1926; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
30,952,397
en
C#
array_ops
intermediate
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,778,878
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 437735 в C#?
int buffer = 437735;
### Instruction: Как объявить переменную buffer со значением 437735 в C#? ### Response: int buffer = 437735;
2,477,220
kk
C#
var_decl
beginner
C# тілінде 861084 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 861084;
### Instruction: C# тілінде 861084 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 861084;
54,662,404
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 436 простым.
public bool IsPrime() { int n = 436; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 436 простым. ### Response: public bool IsPrime() { int n = 436; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
716,725
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 5163.
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(5163) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 5163. ### 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(5163) << std::endl;
88,228
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 1394.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1394)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 1394. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1394)); }
763,260
kk
C#
var_decl
beginner
C# тілінде 466269 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 466269;
### Instruction: C# тілінде 466269 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 466269;
81,618,881
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2046 високосным.
public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2046 високосным. ### Response: public bool IsLeap() { int y = 2046; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
128,994
kk
Java
factorial
advanced
Java тілінде 2770 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2770));
### Instruction: Java тілінде 2770 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(2770));
62,438,209
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(); }
31,825,696
kk
JavaScript
string_ops
advanced
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
93,510,664
en
JavaScript
array_ops
intermediate
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);
110,946
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 714.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(714))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 714. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(714))
83,663,454
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
3,254,277
en
C#
var_decl
beginner
How to declare a variable value with value 493668 in C#?
int value = 493668;
### Instruction: How to declare a variable value with value 493668 in C#? ### Response: int value = 493668;
4,073,908
kk
Java
var_decl
beginner
Java тілінде 263169 мәнімен level айнымалысын қалай жариялауға болады?
int level = 263169;
### Instruction: Java тілінде 263169 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 263169;
83,757,276
kk
C++
array_ops
advanced
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
4,677,102
en
Python
var_decl
beginner
How to declare a variable offset with value 303485 in Python?
offset = 303485
### Instruction: How to declare a variable offset with value 303485 in Python? ### Response: offset = 303485
26,658,992
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; }
3,548,981
kk
Python
var_decl
beginner
Python тілінде 699292 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 699292
### Instruction: Python тілінде 699292 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 699292
754,912
en
Java
var_decl
beginner
How to declare a variable timer with value 226253 in Java?
int timer = 226253;
### Instruction: How to declare a variable timer with value 226253 in Java? ### Response: int timer = 226253;
71,500,825
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 225 простым.
public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 225 простым. ### Response: public bool IsPrime() { int n = 225; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,198,013
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
70,362,795
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
13,327,329
en
Java
logic_ops
intermediate
Write a function that determines if the number 178 is prime in Java.
public bool IsPrime() { int n = 178; 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 178 is prime in Java. ### Response: public bool IsPrime() { int n = 178; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
94,086,337
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
3,313,587
en
Java
var_decl
beginner
How to declare a variable score with value 569963 in Java?
int score = 569963;
### Instruction: How to declare a variable score with value 569963 in Java? ### Response: int score = 569963;
4,659,853
en
JavaScript
var_decl
beginner
How to declare a variable result with value 209702 in JavaScript?
let result = 209702;
### Instruction: How to declare a variable result with value 209702 in JavaScript? ### Response: let result = 209702;
4,912,708
kk
Python
var_decl
beginner
Python тілінде 479033 мәнімен limit айнымалысын қалай жариялауға болады?
limit = 479033
### Instruction: Python тілінде 479033 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: limit = 479033
93,573,597
kk
Java
logic_ops
advanced
Java тилінде 393 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 393; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 393 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 393; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
62,739,955
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,257,902
ru
C#
var_decl
beginner
Как объявить переменную size со значением 406020 в C#?
int size = 406020;
### Instruction: Как объявить переменную size со значением 406020 в C#? ### Response: int size = 406020;
19,489,211
en
C#
string_ops
intermediate
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
2,942,017
en
Python
var_decl
beginner
How to declare a variable health with value 66602 in Python?
health = 66602
### Instruction: How to declare a variable health with value 66602 in Python? ### Response: health = 66602
3,433,623
kk
C#
var_decl
beginner
C# тілінде 279303 мәнімен x айнымалысын қалай жариялауға болады?
int x = 279303;
### Instruction: C# тілінде 279303 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 279303;
2,193,146
ru
Python
var_decl
beginner
Как объявить переменную value со значением 681703 в Python?
value = 681703
### Instruction: Как объявить переменную value со значением 681703 в Python? ### Response: value = 681703
1,477,358
kk
C++
var_decl
beginner
C++ тілінде 996586 мәнімен health айнымалысын қалай жариялауға болады?
int health = 996586;
### Instruction: C++ тілінде 996586 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 996586;
38,504,375
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; }
73,613,563
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 285 простым.
public bool IsPrime() { int n = 285; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 285 простым. ### Response: public bool IsPrime() { int n = 285; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,628,159
en
JavaScript
var_decl
beginner
How to declare a variable count with value 503556 in JavaScript?
let count = 503556;
### Instruction: How to declare a variable count with value 503556 in JavaScript? ### Response: let count = 503556;
33,268,696
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; }
93,246,944
en
Python
string_ops
advanced
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
85,674,076
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
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 Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
628,777
kk
Python
sum_n
intermediate
Python тілінде 1-ден 1686-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1686))
### Instruction: Python тілінде 1-ден 1686-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(1686))
22,423,403
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
47,408,608
ru
C#
array_ops
intermediate
Напишите на 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; }
680,317
ru
C#
var_decl
beginner
Как объявить переменную value со значением 435071 в C#?
int value = 435071;
### Instruction: Как объявить переменную value со значением 435071 в C#? ### Response: int value = 435071;
72,307,189
en
C#
logic_ops
advanced
Write logic to check if the year 2038 is a leap year in C#.
public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2038 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2038; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }