id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
27,461,956 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
57,664,593 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 81 простым. | function isPrime() {
let n = 81;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 81 простым.
### Response:
function isPrime() {
let n = 81;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
28,795,295 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
30,970,178 | ru | C# | logic_ops | intermediate | Напишите на 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;
} |
491,979 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 4031. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4031)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 4031.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(4031)); |
4,740,164 | en | Python | var_decl | beginner | How to declare a variable offset with value 600785 in Python? | offset = 600785 | ### Instruction:
How to declare a variable offset with value 600785 in Python?
### Response:
offset = 600785 |
87,114,380 | en | C# | logic_ops | intermediate | Write a function that determines if the number 334 is prime in C#. | public bool IsPrime() {
int n = 334;
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 334 is prime in C#.
### Response:
public bool IsPrime() {
int n = 334;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,650,112 | ru | C++ | var_decl | beginner | Как объявить переменную offset со значением 583808 в C++? | int offset = 583808; | ### Instruction:
Как объявить переменную offset со значением 583808 в C++?
### Response:
int offset = 583808; |
2,374,283 | en | Unity | var_decl | beginner | How to declare a variable buffer with value 232291 in Unity? | int buffer = 232291; | ### Instruction:
How to declare a variable buffer with value 232291 in Unity?
### Response:
int buffer = 232291; |
37,813,009 | kk | Java | logic_ops | intermediate | Java тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2039;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2039 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2039;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
31,254,412 | kk | 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;
} |
1,293,033 | ru | Python | var_decl | beginner | Как объявить переменную timer со значением 9620 в Python? | timer = 9620 | ### Instruction:
Как объявить переменную timer со значением 9620 в Python?
### Response:
timer = 9620 |
59,094,016 | kk | 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;
} |
31,830,494 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
64,330,571 | en | JavaScript | array_ops | intermediate | 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); |
1,537,603 | ru | C# | var_decl | beginner | Как объявить переменную offset со значением 668738 в C#? | int offset = 668738; | ### Instruction:
Как объявить переменную offset со значением 668738 в C#?
### Response:
int offset = 668738; |
75,173,167 | 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();
} |
4,186,062 | ru | Python | var_decl | beginner | Как объявить переменную data со значением 481278 в Python? | data = 481278 | ### Instruction:
Как объявить переменную data со значением 481278 в Python?
### Response:
data = 481278 |
941,636 | kk | C++ | var_decl | beginner | C++ тілінде 947482 мәнімен size айнымалысын қалай жариялауға болады? | int size = 947482; | ### Instruction:
C++ тілінде 947482 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 947482; |
90,034,952 | 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] |
90,908,697 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 2081 високосным. | public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 2081 високосным.
### Response:
public bool IsLeap() {
int y = 2081;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
170,769 | kk | Unity | var_decl | beginner | Unity тілінде 69271 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 69271; | ### Instruction:
Unity тілінде 69271 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 69271; |
75,469,099 | kk | Python | logic_ops | advanced | Python тилінде 2082 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 2082
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 2082 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 2082
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
10,651,119 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 190 is prime in JavaScript. | function isPrime() {
let n = 190;
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 190 is prime in JavaScript.
### Response:
function isPrime() {
let n = 190;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
20,182,055 | kk | C++ | array_ops | intermediate | C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
1,930,164 | ru | JavaScript | var_decl | beginner | Как объявить переменную buffer со значением 865479 в JavaScript? | let buffer = 865479; | ### Instruction:
Как объявить переменную buffer со значением 865479 в JavaScript?
### Response:
let buffer = 865479; |
2,469,387 | en | C# | var_decl | beginner | How to declare a variable score with value 449219 in C#? | int score = 449219; | ### Instruction:
How to declare a variable score with value 449219 in C#?
### Response:
int score = 449219; |
59,956,681 | 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);
} |
36,576,309 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
68,877,910 | en | Java | logic_ops | intermediate | Write logic to check if the year 1929 is a leap year in Java. | public bool IsLeap() {
int y = 1929;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1929 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1929;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
768,343 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 1836. | 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(1836) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 1836.
### 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(1836) << std::endl; |
51,601,566 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
319,769 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 303-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(303)); | ### Instruction:
JavaScript тілінде 1-ден 303-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(303)); |
322,641 | kk | JavaScript | factorial | advanced | JavaScript тілінде 5728 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5728)); | ### Instruction:
JavaScript тілінде 5728 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(5728)); |
71,512,489 | 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] |
852,780 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 4979. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4979)) | ### Instruction:
Write a function in Python that calculates the factorial of 4979.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(4979)) |
4,952,410 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 204605 мәнімен data айнымалысын қалай жариялауға болады? | let data = 204605; | ### Instruction:
JavaScript тілінде 204605 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
let data = 204605; |
3,196,507 | en | Java | var_decl | beginner | How to declare a variable index with value 65979 in Java? | int index = 65979; | ### Instruction:
How to declare a variable index with value 65979 in Java?
### Response:
int index = 65979; |
60,278,058 | 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;
} |
777,555 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 6344. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6344));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 6344.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6344));
} |
384,357 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 9898. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9898));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 9898.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9898));
} |
96,484,234 | 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;
} |
52,021,002 | kk | Python | logic_ops | advanced | Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 66
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 66
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
96,189,970 | en | JavaScript | array_ops | advanced | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
2,968,453 | kk | C# | var_decl | beginner | C# тілінде 757282 мәнімен level айнымалысын қалай жариялауға болады? | int level = 757282; | ### Instruction:
C# тілінде 757282 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 757282; |
3,079,972 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 283706 в Java? | int data = 283706; | ### Instruction:
Как объявить переменную data со значением 283706 в Java?
### Response:
int data = 283706; |
1,934,650 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 796053 в Python? | limit = 796053 | ### Instruction:
Как объявить переменную limit со значением 796053 в Python?
### Response:
limit = 796053 |
487,864 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 7012. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7012)); | ### Instruction:
Write a function in Java that calculates the factorial of 7012.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(7012)); |
3,190,480 | ru | Python | var_decl | beginner | Как объявить переменную timer со значением 73469 в Python? | timer = 73469 | ### Instruction:
Как объявить переменную timer со значением 73469 в Python?
### Response:
timer = 73469 |
39,100,790 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 156 простым. | function isPrime() {
let n = 156;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 156 простым.
### Response:
function isPrime() {
let n = 156;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,441,356 | kk | C# | var_decl | beginner | C# тілінде 156004 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 156004; | ### Instruction:
C# тілінде 156004 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 156004; |
4,626,911 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 115370 в Unity? | int rate = 115370; | ### Instruction:
Как объявить переменную rate со значением 115370 в Unity?
### Response:
int rate = 115370; |
331,907 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 3518-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3518)); | ### Instruction:
JavaScript тілінде 1-ден 3518-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(3518)); |
94,474,870 | kk | Unity | logic_ops | advanced | Unity тилінде 111 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 111;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 111 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 111;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,377,465 | en | Unity | var_decl | beginner | How to declare a variable timer with value 721322 in Unity? | int timer = 721322; | ### Instruction:
How to declare a variable timer with value 721322 in Unity?
### Response:
int timer = 721322; |
52,989,480 | en | JavaScript | string_ops | intermediate | 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(); |
3,580,641 | ru | C# | var_decl | beginner | Как объявить переменную amount со значением 553425 в C#? | int amount = 553425; | ### Instruction:
Как объявить переменную amount со значением 553425 в C#?
### Response:
int amount = 553425; |
3,899,436 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 989887 в Python? | index = 989887 | ### Instruction:
Как объявить переменную index со значением 989887 в Python?
### Response:
index = 989887 |
66,441,736 | 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;
} |
3,469,619 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 991585 in JavaScript? | let x = 991585; | ### Instruction:
How to declare a variable x with value 991585 in JavaScript?
### Response:
let x = 991585; |
3,227,777 | ru | C++ | var_decl | beginner | Как объявить переменную level со значением 626875 в C++? | int level = 626875; | ### Instruction:
Как объявить переменную level со значением 626875 в C++?
### Response:
int level = 626875; |
48,449,572 | en | Unity | logic_ops | advanced | Write a function that determines if the number 296 is prime in Unity. | public bool IsPrime() {
int n = 296;
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 296 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 296;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
11,981,012 | 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;
} |
83,416,693 | 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;
} |
76,898,138 | 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;
} |
65,510,431 | 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;
} |
57,495,250 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 49 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 49;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 49 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 49;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
14,708,029 | en | JavaScript | array_ops | advanced | 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(); |
80,902,916 | 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();
} |
50,884,486 | 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;
} |
1,365,578 | kk | C# | var_decl | beginner | C# тілінде 6166 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 6166; | ### Instruction:
C# тілінде 6166 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 6166; |
78,071,973 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Unity функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
60,162,893 | ru | C# | logic_ops | intermediate | Напишите на C# логику проверки, является ли год 1971 високосным. | public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1971 високосным.
### Response:
public bool IsLeap() {
int y = 1971;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,698,859 | kk | Java | var_decl | beginner | Java тілінде 29138 мәнімен y айнымалысын қалай жариялауға болады? | int y = 29138; | ### Instruction:
Java тілінде 29138 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 29138; |
33,242 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 4447. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4447));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 4447.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4447));
} |
143,688 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 802-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(802)); | ### Instruction:
JavaScript тілінде 1-ден 802-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(802)); |
77,629,009 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,844,927 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 16317 in JavaScript? | let y = 16317; | ### Instruction:
How to declare a variable y with value 16317 in JavaScript?
### Response:
let y = 16317; |
155,273 | en | Python | factorial | advanced | Write a function in Python that calculates the factorial of 2853. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2853)) | ### Instruction:
Write a function in Python that calculates the factorial of 2853.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(2853)) |
99,591,183 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 487 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 487;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 487 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 487;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
54,719,526 | en | Java | array_ops | intermediate | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
38,136,635 | en | JavaScript | array_ops | advanced | 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(); |
76,920,567 | 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,913,458 | kk | C# | var_decl | beginner | C# тілінде 177366 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 177366; | ### Instruction:
C# тілінде 177366 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 177366; |
854,132 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 7415. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7415)); | ### Instruction:
Write a function in C# that calculates the factorial of 7415.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7415)); |
355,046 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 8242. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8242));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 8242.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8242));
} |
335,866 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 4389-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4389)) | ### Instruction:
Python тілінде 1-ден 4389-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4389)) |
236,264 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 290381 в Java? | int health = 290381; | ### Instruction:
Как объявить переменную health со значением 290381 в Java?
### Response:
int health = 290381; |
29,147,305 | kk | Python | logic_ops | advanced | Python тилінде 464 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 464
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 464 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 464
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
94,674,352 | 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;
} |
3,157,496 | ru | C# | var_decl | beginner | Как объявить переменную score со значением 478945 в C#? | int score = 478945; | ### Instruction:
Как объявить переменную score со значением 478945 в C#?
### Response:
int score = 478945; |
23,695,047 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,583,950 | kk | Java | var_decl | beginner | Java тілінде 762742 мәнімен count айнымалысын қалай жариялауға болады? | int count = 762742; | ### Instruction:
Java тілінде 762742 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 762742; |
3,740,122 | kk | Java | var_decl | beginner | Java тілінде 107386 мәнімен data айнымалысын қалай жариялауға болады? | int data = 107386; | ### Instruction:
Java тілінде 107386 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 107386; |
22,377,662 | 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;
} |
27,247,424 | ru | 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);
} |
4,044,051 | ru | C# | var_decl | beginner | Как объявить переменную x со значением 125725 в C#? | int x = 125725; | ### Instruction:
Как объявить переменную x со значением 125725 в C#?
### Response:
int x = 125725; |
60,946,065 | 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();
} |
975,048 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 999833 in JavaScript? | let limit = 999833; | ### Instruction:
How to declare a variable limit with value 999833 in JavaScript?
### Response:
let limit = 999833; |
97,452,358 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.