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
87,934,132
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
99,303,563
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
70,240,448
en
C#
array_ops
advanced
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
51,645,177
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,944,519
en
Java
var_decl
beginner
How to declare a variable speed with value 426223 in Java?
int speed = 426223;
### Instruction: How to declare a variable speed with value 426223 in Java? ### Response: int speed = 426223;
24,469,281
kk
C++
array_ops
advanced
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,025,661
kk
Unity
var_decl
beginner
Unity тілінде 262060 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 262060;
### Instruction: Unity тілінде 262060 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 262060;
61,701,684
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();
49,166,856
en
C++
array_ops
advanced
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
79,292,119
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,470,172
en
Python
var_decl
beginner
How to declare a variable size with value 109897 in Python?
size = 109897
### Instruction: How to declare a variable size with value 109897 in Python? ### Response: size = 109897
1,591,830
ru
JavaScript
var_decl
beginner
Как объявить переменную timer со значением 263288 в JavaScript?
let timer = 263288;
### Instruction: Как объявить переменную timer со значением 263288 в JavaScript? ### Response: let timer = 263288;
3,392,203
ru
JavaScript
var_decl
beginner
Как объявить переменную buffer со значением 889981 в JavaScript?
let buffer = 889981;
### Instruction: Как объявить переменную buffer со значением 889981 в JavaScript? ### Response: let buffer = 889981;
354,681
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 6127.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6127));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 6127. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6127));
71,986,790
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
16,004,137
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
754,980
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 6237.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6237)); }
### Instruction: Write a function in Unity that calculates the factorial of 6237. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6237)); }
37,304,949
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; }
19,011,127
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1936 is a leap year in JavaScript.
function isLeap() { let y = 1936; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1936 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1936; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
3,236,723
en
JavaScript
var_decl
beginner
How to declare a variable weight with value 536869 in JavaScript?
let weight = 536869;
### Instruction: How to declare a variable weight with value 536869 in JavaScript? ### Response: let weight = 536869;
43,590,397
ru
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; }
4,568,657
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 442188 в C++?
int buffer = 442188;
### Instruction: Как объявить переменную buffer со значением 442188 в C++? ### Response: int buffer = 442188;
177,140
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 3309.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3309)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 3309. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(3309)); }
22,294,073
en
Python
logic_ops
intermediate
Write logic to check if the year 2030 is a leap year in Python.
def is_leap(): year = 2030 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2030 is a leap year in Python. ### Response: def is_leap(): year = 2030 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
94,515,281
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
45,167,583
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
540,723
kk
Java
var_decl
beginner
Java тілінде 836935 мәнімен total айнымалысын қалай жариялауға болады?
int total = 836935;
### Instruction: Java тілінде 836935 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 836935;
37,629,408
kk
Unity
logic_ops
intermediate
Unity тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1944; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1944 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1944; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
28,408,250
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
95,659,011
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();
1,858,014
en
Java
var_decl
beginner
How to declare a variable limit with value 622221 in Java?
int limit = 622221;
### Instruction: How to declare a variable limit with value 622221 in Java? ### Response: int limit = 622221;
2,459,414
kk
Python
var_decl
beginner
Python тілінде 95907 мәнімен size айнымалысын қалай жариялауға болады?
size = 95907
### Instruction: Python тілінде 95907 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 95907
4,435,132
en
Java
var_decl
beginner
How to declare a variable weight with value 625229 in Java?
int weight = 625229;
### Instruction: How to declare a variable weight with value 625229 in Java? ### Response: int weight = 625229;
3,182,777
kk
Unity
var_decl
beginner
Unity тілінде 867191 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 867191;
### Instruction: Unity тілінде 867191 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 867191;
72,028,550
kk
Unity
logic_ops
intermediate
Unity тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2078; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2078; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
86,022,464
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
const reverseArr = arr => arr.reverse();
### Instruction: Напишите на JavaScript функцию, которая разворачивает список задом наперед. ### Response: const reverseArr = arr => arr.reverse();
96,730,049
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
45,593,389
kk
Python
logic_ops
advanced
Python тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 78 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 78 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 78 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
98,740,284
en
Unity
logic_ops
advanced
Write logic to check if the year 1924 is a leap year in Unity.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1924 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,623,504
en
C#
logic_ops
intermediate
Write a function that determines if the number 12 is prime in C#.
public bool IsPrime() { int n = 12; 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 12 is prime in C#. ### Response: public bool IsPrime() { int n = 12; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
60,998,750
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
89,981,781
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(); }
917,108
kk
JavaScript
factorial
advanced
JavaScript тілінде 17 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(17));
### Instruction: JavaScript тілінде 17 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(17));
201,522
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 5662-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5662)); }
### Instruction: Unity тілінде 1-ден 5662-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5662)); }
81,147,691
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
25,975,759
kk
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; }
620,478
kk
Java
var_decl
beginner
Java тілінде 822426 мәнімен size айнымалысын қалай жариялауға болады?
int size = 822426;
### Instruction: Java тілінде 822426 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 822426;
1,373,076
en
C++
var_decl
beginner
How to declare a variable offset with value 214802 in C++?
int offset = 214802;
### Instruction: How to declare a variable offset with value 214802 in C++? ### Response: int offset = 214802;
2,322,137
en
Unity
var_decl
beginner
How to declare a variable rate with value 423839 in Unity?
int rate = 423839;
### Instruction: How to declare a variable rate with value 423839 in Unity? ### Response: int rate = 423839;
54,508,065
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 2017 is a leap year in JavaScript.
function isLeap() { let y = 2017; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2017 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2017; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
59,231,815
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 354 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 354; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 354 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 354; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
51,423,978
en
C++
logic_ops
intermediate
Write a function that determines if the number 420 is prime in C++.
public bool IsPrime() { int n = 420; 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 420 is prime in C++. ### Response: public bool IsPrime() { int n = 420; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
25,604,302
en
Unity
logic_ops
advanced
Write logic to check if the year 2047 is a leap year in Unity.
public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2047 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
72,058,694
kk
C++
logic_ops
intermediate
C++ тилінде 249 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 249; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 249 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 249; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
475,173
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3037-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3037)); }
### Instruction: Unity тілінде 1-ден 3037-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3037)); }
32,513,142
kk
Unity
logic_ops
advanced
Unity тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
85,977,673
en
Unity
logic_ops
intermediate
Write a function that determines if the number 192 is prime in Unity.
public bool IsPrime() { int n = 192; 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 192 is prime in Unity. ### Response: public bool IsPrime() { int n = 192; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
63,651,725
kk
Python
logic_ops
intermediate
Python тилінде 1951 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1951 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1951 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1951 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
59,511,686
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,614,491
kk
Unity
var_decl
beginner
Unity тілінде 864418 мәнімен health айнымалысын қалай жариялауға болады?
int health = 864418;
### Instruction: Unity тілінде 864418 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 864418;
55,143,077
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2052 високосным.
function isLeap() { let y = 2052; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2052 високосным. ### Response: function isLeap() { let y = 2052; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
18,428
ru
Java
func_def
intermediate
Напиши функцию validate в Java, которая принимает x и удваивает его.
static int validate(int x) { return x * 2; }
### Instruction: Напиши функцию validate в Java, которая принимает x и удваивает его. ### Response: static int validate(int x) { return x * 2; }
10,128,110
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]
48,514,512
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; }
356,082
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 7123.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7123));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 7123. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7123));
12,292,824
en
C++
array_ops
advanced
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
51,714,510
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
23,660,344
en
C#
logic_ops
intermediate
Write a function that determines if the number 105 is prime in C#.
public bool IsPrime() { int n = 105; 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 105 is prime in C#. ### Response: public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
29,243,073
en
Python
logic_ops
advanced
Write logic to check if the year 1936 is a leap year in Python.
def is_leap(): year = 1936 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1936 is a leap year in Python. ### Response: def is_leap(): year = 1936 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
92,595,373
kk
C++
array_ops
intermediate
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
39,851,833
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)
47,400,972
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
31,600,848
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 225 простым.
function isPrime() { let n = 225; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 225 простым. ### Response: function isPrime() { let n = 225; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
97,941,953
en
C++
string_ops
advanced
Write a function that counts vowels in a text in C++.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C++. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
514,059
kk
Java
var_decl
beginner
Java тілінде 297699 мәнімен health айнымалысын қалай жариялауға болады?
int health = 297699;
### Instruction: Java тілінде 297699 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 297699;
41,808,855
ru
Java
logic_ops
advanced
Напишите на Java функцию, определяющую, является ли число 210 простым.
public bool IsPrime() { int n = 210; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 210 простым. ### Response: public bool IsPrime() { int n = 210; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
850,654
ru
Java
var_decl
beginner
Как объявить переменную health со значением 652425 в Java?
int health = 652425;
### Instruction: Как объявить переменную health со значением 652425 в Java? ### Response: int health = 652425;
53,518,703
kk
C++
string_ops
advanced
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
602,365
kk
C++
factorial
advanced
C++ тілінде 7881 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7881) << std::endl;
### Instruction: C++ тілінде 7881 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7881) << std::endl;
63,442,318
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
28,966,652
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; }
789,389
kk
C#
var_decl
beginner
C# тілінде 885432 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 885432;
### Instruction: C# тілінде 885432 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 885432;
1,962,361
kk
JavaScript
var_decl
beginner
JavaScript тілінде 73462 мәнімен limit айнымалысын қалай жариялауға болады?
let limit = 73462;
### Instruction: JavaScript тілінде 73462 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: let limit = 73462;
75,596,645
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; }
999,247
kk
C++
var_decl
beginner
C++ тілінде 91125 мәнімен health айнымалысын қалай жариялауға болады?
int health = 91125;
### Instruction: C++ тілінде 91125 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 91125;
18,070,872
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 93 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 93; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 93 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 93; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
58,400,087
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; }
97,551,694
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); }
60,215
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 6079-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6079));
### Instruction: JavaScript тілінде 1-ден 6079-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6079));
90,371,664
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; }
18,791,349
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 83 простым.
def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 83 простым. ### Response: def is_prime(): n = 83 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
14,237,861
en
C#
array_ops
intermediate
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
35,778,144
ru
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; }
4,106,664
en
C#
var_decl
beginner
How to declare a variable limit with value 554705 in C#?
int limit = 554705;
### Instruction: How to declare a variable limit with value 554705 in C#? ### Response: int limit = 554705;
1,243,500
en
Python
var_decl
beginner
How to declare a variable score with value 589440 in Python?
score = 589440
### Instruction: How to declare a variable score with value 589440 in Python? ### Response: score = 589440
4,709,329
ru
C#
var_decl
beginner
Как объявить переменную health со значением 469010 в C#?
int health = 469010;
### Instruction: Как объявить переменную health со значением 469010 в C#? ### Response: int health = 469010;
63,495,087
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; }
31,688,208
kk
Java
logic_ops
intermediate
Java тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,487,060
kk
C#
array_ops
advanced
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
18,078,293
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }