id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
25,129,178 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1946 is a leap year in Unity. | public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1946 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
72,913,883 | 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;
} |
12,140,689 | en | JavaScript | array_ops | intermediate | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
47,438,653 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
68,499,349 | en | C++ | array_ops | advanced | Write a function that filters only even numbers from a list in C++. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C++.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,016,559 | en | Python | var_decl | beginner | How to declare a variable level with value 54727 in Python? | level = 54727 | ### Instruction:
How to declare a variable level with value 54727 in Python?
### Response:
level = 54727 |
837,278 | en | Java | var_decl | beginner | How to declare a variable limit with value 693657 in Java? | int limit = 693657; | ### Instruction:
How to declare a variable limit with value 693657 in Java?
### Response:
int limit = 693657; |
70,162,818 | 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(); |
2,909,727 | kk | C# | var_decl | beginner | C# тілінде 293027 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 293027; | ### Instruction:
C# тілінде 293027 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 293027; |
1,162,961 | kk | Java | var_decl | beginner | Java тілінде 192673 мәнімен index айнымалысын қалай жариялауға болады? | int index = 192673; | ### Instruction:
Java тілінде 192673 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 192673; |
62,841,222 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1990;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1990 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1990;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
90,904,067 | en | Java | array_ops | advanced | 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);
} |
73,245,410 | 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();
} |
25,029,037 | kk | Java | string_ops | intermediate | Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
517,176 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 6231-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6231)); | ### Instruction:
Java тілінде 1-ден 6231-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6231)); |
69,438,084 | kk | Java | logic_ops | intermediate | Java тилінде 207 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 207;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 207 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 207;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
76,887,937 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1954 is a leap year in JavaScript. | function isLeap() {
let y = 1954;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1954 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1954;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
16,163,662 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1971 is a leap year in JavaScript. | function isLeap() {
let 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 JavaScript.
### Response:
function isLeap() {
let y = 1971;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
78,285,836 | kk | C++ | logic_ops | intermediate | C++ тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1982;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1982 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1982;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,891,802 | en | Java | var_decl | beginner | How to declare a variable weight with value 212377 in Java? | int weight = 212377; | ### Instruction:
How to declare a variable weight with value 212377 in Java?
### Response:
int weight = 212377; |
76,360 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 8663. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8663) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 8663.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(8663) << std::endl; |
1,075,428 | ru | Unity | var_decl | beginner | Как объявить переменную y со значением 537031 в Unity? | int y = 537031; | ### Instruction:
Как объявить переменную y со значением 537031 в Unity?
### Response:
int y = 537031; |
427,887 | kk | C++ | var_decl | beginner | C++ тілінде 899003 мәнімен result айнымалысын қалай жариялауға болады? | int result = 899003; | ### Instruction:
C++ тілінде 899003 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 899003; |
4,509,017 | en | JavaScript | var_decl | beginner | How to declare a variable x with value 772228 in JavaScript? | let x = 772228; | ### Instruction:
How to declare a variable x with value 772228 in JavaScript?
### Response:
let x = 772228; |
47,429,023 | 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;
} |
128,861 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 6488-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6488)); | ### Instruction:
C# тілінде 1-ден 6488-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6488)); |
1,220,361 | kk | C# | var_decl | beginner | C# тілінде 818965 мәнімен health айнымалысын қалай жариялауға болады? | int health = 818965; | ### Instruction:
C# тілінде 818965 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 818965; |
51,403,675 | kk | 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);
} |
4,156,438 | ru | Java | var_decl | beginner | Как объявить переменную level со значением 233378 в Java? | int level = 233378; | ### Instruction:
Как объявить переменную level со значением 233378 в Java?
### Response:
int level = 233378; |
97,470,569 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
63,722,752 | kk | Unity | array_ops | advanced | Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
39,976,760 | 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();
} |
77,756,709 | kk | Unity | string_ops | advanced | 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;
} |
36,843,082 | en | Java | string_ops | advanced | 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;
} |
93,169,004 | en | C# | logic_ops | intermediate | Write a function that determines if the number 495 is prime in C#. | public bool IsPrime() {
int n = 495;
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 495 is prime in C#.
### Response:
public bool IsPrime() {
int n = 495;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
68,920,446 | en | Python | logic_ops | intermediate | Write logic to check if the year 1963 is a leap year in Python. | def is_leap():
year = 1963
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1963 is a leap year in Python.
### Response:
def is_leap():
year = 1963
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
77,674,837 | en | C# | string_ops | intermediate | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
4,038,691 | ru | Python | var_decl | beginner | Как объявить переменную result со значением 587342 в Python? | result = 587342 | ### Instruction:
Как объявить переменную result со значением 587342 в Python?
### Response:
result = 587342 |
2,214,868 | en | C# | var_decl | beginner | How to declare a variable health with value 207700 in C#? | int health = 207700; | ### Instruction:
How to declare a variable health with value 207700 in C#?
### Response:
int health = 207700; |
147,881 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 271. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(271)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 271.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(271)); |
73,866,464 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
20,396,981 | 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,360,330 | en | Java | var_decl | beginner | How to declare a variable timer with value 931124 in Java? | int timer = 931124; | ### Instruction:
How to declare a variable timer with value 931124 in Java?
### Response:
int timer = 931124; |
83,537,007 | 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);
} |
5,583 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 6715-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(6715) << std::endl; | ### Instruction:
C++ тілінде 1-ден 6715-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(6715) << std::endl; |
42,236,208 | 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); |
84,319,548 | 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();
} |
949,682 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 3444. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3444)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 3444.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(3444)) |
3,887,248 | en | Java | var_decl | beginner | How to declare a variable speed with value 508528 in Java? | int speed = 508528; | ### Instruction:
How to declare a variable speed with value 508528 in Java?
### Response:
int speed = 508528; |
34,890,658 | ru | 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;
} |
20,855,208 | 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() |
31,155,516 | en | C++ | array_ops | intermediate | 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;
} |
42,989,964 | 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;
} |
68,555,357 | kk | Java | logic_ops | intermediate | Java тилінде 361 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 361;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 361 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 361;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
84,139,176 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,651,064 | en | C++ | var_decl | beginner | How to declare a variable amount with value 750492 in C++? | int amount = 750492; | ### Instruction:
How to declare a variable amount with value 750492 in C++?
### Response:
int amount = 750492; |
27,310,292 | 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);
} |
307,887 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 5082-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5082)); | ### Instruction:
JavaScript тілінде 1-ден 5082-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5082)); |
53,609,342 | 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;
} |
2,709,771 | ru | C++ | var_decl | beginner | Как объявить переменную speed со значением 371058 в C++? | int speed = 371058; | ### Instruction:
Как объявить переменную speed со значением 371058 в C++?
### Response:
int speed = 371058; |
261,292 | kk | Unity | factorial | advanced | Unity тілінде 9633 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9633));
} | ### Instruction:
Unity тілінде 9633 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(9633));
} |
16,965,061 | 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;
} |
60,582,597 | kk | Python | string_ops | advanced | Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Python тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
1,599,851 | en | C# | var_decl | beginner | How to declare a variable offset with value 789478 in C#? | int offset = 789478; | ### Instruction:
How to declare a variable offset with value 789478 in C#?
### Response:
int offset = 789478; |
21,996,252 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
16,609,998 | kk | Java | logic_ops | advanced | Java тилінде 481 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 481;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 481 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 481;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
13,054,355 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
49,440,140 | 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;
} |
19,894,394 | kk | Java | logic_ops | advanced | Java тилінде 458 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 458;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 458 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 458;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
52,189,702 | kk | Java | logic_ops | advanced | Java тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2016 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,882,258 | kk | Unity | var_decl | beginner | Unity тілінде 885320 мәнімен level айнымалысын қалай жариялауға болады? | int level = 885320; | ### Instruction:
Unity тілінде 885320 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 885320; |
316,672 | en | C++ | var_decl | beginner | How to declare a variable index with value 712624 in C++? | int index = 712624; | ### Instruction:
How to declare a variable index with value 712624 in C++?
### Response:
int index = 712624; |
27,739,711 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
421,974 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 7128. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7128)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 7128.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7128)); |
283,723 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 7979. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7979)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 7979.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7979)); |
3,276,455 | kk | C# | var_decl | beginner | C# тілінде 993979 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 993979; | ### Instruction:
C# тілінде 993979 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 993979; |
81,482,548 | 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;
} |
24,475,072 | 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;
} |
49,320,470 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
55,214,943 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
1,774,973 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 542777 в Java? | int data = 542777; | ### Instruction:
Как объявить переменную data со значением 542777 в Java?
### Response:
int data = 542777; |
71,812,217 | en | Python | array_ops | advanced | 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] |
81,839,292 | 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; |
1,841,477 | kk | Unity | var_decl | beginner | Unity тілінде 686912 мәнімен result айнымалысын қалай жариялауға болады? | int result = 686912; | ### Instruction:
Unity тілінде 686912 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 686912; |
1,028,817 | kk | C++ | var_decl | beginner | C++ тілінде 618756 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 618756; | ### Instruction:
C++ тілінде 618756 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 618756; |
43,921 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 4065. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4065)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 4065.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4065)); |
98,652,449 | en | Python | logic_ops | advanced | Write a function that determines if the number 406 is prime in Python. | def is_prime():
n = 406
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Write a function that determines if the number 406 is prime in Python.
### Response:
def is_prime():
n = 406
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
20,424,123 | en | C++ | logic_ops | advanced | Write a function that determines if the number 101 is prime in C++. | public bool IsPrime() {
int n = 101;
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 101 is prime in C++.
### Response:
public bool IsPrime() {
int n = 101;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
27,313,783 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
295,174 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 1107. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1107));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 1107.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(1107));
} |
4,164,175 | en | Python | var_decl | beginner | How to declare a variable value with value 559410 in Python? | value = 559410 | ### Instruction:
How to declare a variable value with value 559410 in Python?
### Response:
value = 559410 |
29,165,846 | ru | C# | array_ops | advanced | Напишите на C# функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на C# функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
48,187,613 | 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;
} |
690,690 | en | Unity | var_decl | beginner | How to declare a variable limit with value 190457 in Unity? | int limit = 190457; | ### Instruction:
How to declare a variable limit with value 190457 in Unity?
### Response:
int limit = 190457; |
26,036,855 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 2067 високосным. | public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2067 високосным.
### Response:
public bool IsLeap() {
int y = 2067;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
4,538,836 | en | C# | var_decl | beginner | How to declare a variable limit with value 502345 in C#? | int limit = 502345; | ### Instruction:
How to declare a variable limit with value 502345 in C#?
### Response:
int limit = 502345; |
3,620,950 | kk | C# | var_decl | beginner | C# тілінде 191743 мәнімен total айнымалысын қалай жариялауға болады? | int total = 191743; | ### Instruction:
C# тілінде 191743 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 191743; |
20,005,312 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
934,249 | kk | C# | var_decl | beginner | C# тілінде 125839 мәнімен result айнымалысын қалай жариялауға болады? | int result = 125839; | ### Instruction:
C# тілінде 125839 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 125839; |
41,347,621 | 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(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.