id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
31,576,070 | 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;
} |
3,238,640 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 576826 в C++? | int total = 576826; | ### Instruction:
Как объявить переменную total со значением 576826 в C++?
### Response:
int total = 576826; |
164,173 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 4190. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4190)) | ### Instruction:
Write a function in Python that calculates the factorial of 4190.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4190)) |
842,765 | kk | JavaScript | factorial | advanced | JavaScript тілінде 598 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(598)); | ### Instruction:
JavaScript тілінде 598 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(598)); |
2,656,084 | en | JavaScript | var_decl | beginner | How to declare a variable timer with value 727739 in JavaScript? | let timer = 727739; | ### Instruction:
How to declare a variable timer with value 727739 in JavaScript?
### Response:
let timer = 727739; |
37,313,062 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
22,662,535 | en | Unity | logic_ops | advanced | Write a function that determines if the number 258 is prime in Unity. | public bool IsPrime() {
int n = 258;
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 258 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 258;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
25,022,286 | kk | Unity | logic_ops | advanced | Unity тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2086 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
196,820 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 4014. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4014)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 4014.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4014)); |
275,263 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 557. | 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(557) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 557.
### 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(557) << std::endl; |
323,664 | kk | C++ | var_decl | beginner | C++ тілінде 626891 мәнімен health айнымалысын қалай жариялауға болады? | int health = 626891; | ### Instruction:
C++ тілінде 626891 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 626891; |
2,378,823 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 995576 in JavaScript? | let x = 995576; | ### Instruction:
How to declare a variable x with value 995576 in JavaScript?
### Response:
let x = 995576; |
99,406,663 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
2,699,885 | en | JavaScript | var_decl | beginner | How to declare a variable health with value 277726 in JavaScript? | let health = 277726; | ### Instruction:
How to declare a variable health with value 277726 in JavaScript?
### Response:
let health = 277726; |
1,988,423 | en | Python | var_decl | beginner | How to declare a variable offset with value 969042 in Python? | offset = 969042 | ### Instruction:
How to declare a variable offset with value 969042 in Python?
### Response:
offset = 969042 |
16,253,844 | ru | 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;
} |
89,244,298 | en | C# | logic_ops | intermediate | Write a function that determines if the number 366 is prime in C#. | public bool IsPrime() {
int n = 366;
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 366 is prime in C#.
### Response:
public bool IsPrime() {
int n = 366;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
64,180,346 | en | Java | logic_ops | intermediate | Write a function that determines if the number 418 is prime in Java. | public bool IsPrime() {
int n = 418;
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 418 is prime in Java.
### Response:
public bool IsPrime() {
int n = 418;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
28,493,924 | en | Python | string_ops | intermediate | 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() |
29,156,034 | en | JavaScript | array_ops | advanced | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
453,233 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 5325. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5325));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5325.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5325));
} |
99,857,682 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
92,267,213 | 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;
} |
500,476 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 1009. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1009));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 1009.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1009));
} |
24,995,273 | 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;
} |
3,774,050 | en | C# | var_decl | beginner | How to declare a variable score with value 164383 in C#? | int score = 164383; | ### Instruction:
How to declare a variable score with value 164383 in C#?
### Response:
int score = 164383; |
95,410,688 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
771,257 | en | C# | var_decl | beginner | How to declare a variable index with value 688812 in C#? | int index = 688812; | ### Instruction:
How to declare a variable index with value 688812 in C#?
### Response:
int index = 688812; |
257,253 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 1960. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1960)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 1960.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1960)); |
86,625,442 | en | Python | logic_ops | advanced | Write logic to check if the year 1961 is a leap year in Python. | def is_leap():
year = 1961
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1961 is a leap year in Python.
### Response:
def is_leap():
year = 1961
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
13,204,646 | 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);
} |
3,702,785 | kk | Python | var_decl | beginner | Python тілінде 970512 мәнімен limit айнымалысын қалай жариялауға болады? | limit = 970512 | ### Instruction:
Python тілінде 970512 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
limit = 970512 |
81,770,936 | kk | Python | logic_ops | intermediate | Python тилінде 289 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 289
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 289 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 289
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
20,921,308 | 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); |
43,754,292 | kk | 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;
} |
48,811,765 | 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;
} |
48,239,418 | en | Java | logic_ops | intermediate | Write logic to check if the year 2043 is a leap year in Java. | public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2043 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
25,829,205 | kk | C# | logic_ops | advanced | C# тилінде 2040 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2040 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
516,173 | kk | Unity | var_decl | beginner | Unity тілінде 923400 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 923400; | ### Instruction:
Unity тілінде 923400 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 923400; |
3,399,291 | kk | Unity | var_decl | beginner | Unity тілінде 224354 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 224354; | ### Instruction:
Unity тілінде 224354 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 224354; |
90,223,272 | 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;
} |
10,538,487 | 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;
} |
2,487,972 | en | Java | var_decl | beginner | How to declare a variable weight with value 67262 in Java? | int weight = 67262; | ### Instruction:
How to declare a variable weight with value 67262 in Java?
### Response:
int weight = 67262; |
633,903 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 9060. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9060)) | ### Instruction:
Write a function in Python that calculates the factorial of 9060.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(9060)) |
359,954 | kk | C# | factorial | advanced | C# тілінде 8577 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8577)); | ### Instruction:
C# тілінде 8577 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8577)); |
2,406,502 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 306834 в Unity? | int rate = 306834; | ### Instruction:
Как объявить переменную rate со значением 306834 в Unity?
### Response:
int rate = 306834; |
306,966 | kk | Unity | var_decl | beginner | Unity тілінде 565877 мәнімен level айнымалысын қалай жариялауға болады? | int level = 565877; | ### Instruction:
Unity тілінде 565877 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 565877; |
75,137,898 | en | Unity | logic_ops | advanced | Write a function that determines if the number 473 is prime in Unity. | public bool IsPrime() {
int n = 473;
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 473 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 473;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
48,773,722 | 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);
} |
53,746,975 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
39,347,879 | en | C++ | logic_ops | advanced | Write logic to check if the year 2047 is a leap year in C++. | 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 C++.
### Response:
public bool IsLeap() {
int y = 2047;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
73,908,393 | 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;
} |
98,961,676 | en | Java | array_ops | intermediate | 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;
} |
166,299 | kk | Java | var_decl | beginner | Java тілінде 503540 мәнімен total айнымалысын қалай жариялауға болады? | int total = 503540; | ### Instruction:
Java тілінде 503540 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 503540; |
72,936,304 | en | Unity | logic_ops | advanced | Write logic to check if the year 1971 is a leap year in Unity. | public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1971 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
531,099 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 7032. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7032) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 7032.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(7032) << std::endl; |
179,321 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 8469-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8469));
} | ### Instruction:
Unity тілінде 1-ден 8469-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8469));
} |
2,690,170 | ru | C# | var_decl | beginner | Как объявить переменную score со значением 594715 в C#? | int score = 594715; | ### Instruction:
Как объявить переменную score со значением 594715 в C#?
### Response:
int score = 594715; |
43,323,848 | 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;
} |
71,860,420 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 2085 високосным. | public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2085 високосным.
### Response:
public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
93,765,109 | 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;
} |
3,936,268 | en | Unity | var_decl | beginner | How to declare a variable speed with value 59492 in Unity? | int speed = 59492; | ### Instruction:
How to declare a variable speed with value 59492 in Unity?
### Response:
int speed = 59492; |
1,641,250 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 51649 в Java? | int x = 51649; | ### Instruction:
Как объявить переменную x со значением 51649 в Java?
### Response:
int x = 51649; |
79,559,478 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
59,882,965 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,095,448 | en | C++ | var_decl | beginner | How to declare a variable offset with value 769808 in C++? | int offset = 769808; | ### Instruction:
How to declare a variable offset with value 769808 in C++?
### Response:
int offset = 769808; |
895,296 | en | Java | var_decl | beginner | How to declare a variable speed with value 776300 in Java? | int speed = 776300; | ### Instruction:
How to declare a variable speed with value 776300 in Java?
### Response:
int speed = 776300; |
25,119,198 | 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;
} |
74,139,690 | 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);
} |
49,280,413 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
2,060,066 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 168120 в C++? | int total = 168120; | ### Instruction:
Как объявить переменную total со значением 168120 в C++?
### Response:
int total = 168120; |
14,568,400 | kk | C# | logic_ops | intermediate | C# тилінде 31 санының жай сан екенін анықтайтын функцияны жазыңыз. | 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:
C# тилінде 31 санының жай сан екенін анықтайтын функцияны жазыңыз.
### 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;
} |
68,872,175 | en | Python | array_ops | intermediate | Write a function that filters only even numbers from a list in Python. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Write a function that filters only even numbers from a list in Python.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
245,853 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 4562. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4562));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 4562.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4562));
} |
63,802,377 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
59,775,922 | en | C++ | logic_ops | advanced | Write logic to check if the year 1979 is a leap year in C++. | 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 C++.
### Response:
public bool IsLeap() {
int y = 1979;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,552,465 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 938353 в C++? | int result = 938353; | ### Instruction:
Как объявить переменную result со значением 938353 в C++?
### Response:
int result = 938353; |
68,805,829 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
496,940 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 4142. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4142));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 4142.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4142));
} |
72,664,164 | ru | 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;
} |
11,689,722 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2068 високосным. | public bool IsLeap() {
int y = 2068;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2068 високосным.
### Response:
public bool IsLeap() {
int y = 2068;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
65,215,228 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
94,156,249 | kk | Java | logic_ops | advanced | Java тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз. | 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:
Java тилінде 105 санының жай сан екенін анықтайтын функцияны жазыңыз.
### 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;
} |
3,148,035 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 653779 в Unity? | int data = 653779; | ### Instruction:
Как объявить переменную data со значением 653779 в Unity?
### Response:
int data = 653779; |
80,526,779 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 294 простым. | public bool IsPrime() {
int n = 294;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 294 простым.
### Response:
public bool IsPrime() {
int n = 294;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,520,380 | en | C++ | var_decl | beginner | How to declare a variable total with value 757795 in C++? | int total = 757795; | ### Instruction:
How to declare a variable total with value 757795 in C++?
### Response:
int total = 757795; |
8,328 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 6384-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6384)); | ### Instruction:
JavaScript тілінде 1-ден 6384-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(6384)); |
38,432,451 | 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;
} |
72,437 | en | Java | func_def | intermediate | Write a function handle in Java that takes level and doubles it. | static int handle(int level) {
return level * 2;
} | ### Instruction:
Write a function handle in Java that takes level and doubles it.
### Response:
static int handle(int level) {
return level * 2;
} |
42,357,607 | 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();
} |
75,486,481 | 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;
} |
65,648,882 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
74,440,435 | en | Java | string_ops | intermediate | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
58,081 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 6370. | 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(6370) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 6370.
### 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(6370) << std::endl; |
95,098,850 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
32,942,735 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2099 високосным. | function isLeap() {
let y = 2099;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2099 високосным.
### Response:
function isLeap() {
let y = 2099;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
64,008,659 | 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;
} |
77,325,921 | 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;
} |
52,195,318 | kk | Java | array_ops | intermediate | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
2,628,441 | kk | Java | var_decl | beginner | Java тілінде 918333 мәнімен count айнымалысын қалай жариялауға болады? | int count = 918333; | ### Instruction:
Java тілінде 918333 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 918333; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.