id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
3,016,029 | en | Python | var_decl | beginner | How to declare a variable count with value 493669 in Python? | count = 493669 | ### Instruction:
How to declare a variable count with value 493669 in Python?
### Response:
count = 493669 |
1,092,544 | kk | Python | var_decl | beginner | Python тілінде 552823 мәнімен score айнымалысын қалай жариялауға болады? | score = 552823 | ### Instruction:
Python тілінде 552823 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
score = 552823 |
227,579 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 3748. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3748)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 3748.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3748)); |
806,616 | ru | Python | var_decl | beginner | Как объявить переменную size со значением 945766 в Python? | size = 945766 | ### Instruction:
Как объявить переменную size со значением 945766 в Python?
### Response:
size = 945766 |
33,257,882 | 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); |
62,819,523 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
691,135 | kk | JavaScript | factorial | advanced | JavaScript тілінде 1975 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1975)); | ### Instruction:
JavaScript тілінде 1975 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1975)); |
84,605,780 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,218,027 | en | Unity | var_decl | beginner | How to declare a variable weight with value 521466 in Unity? | int weight = 521466; | ### Instruction:
How to declare a variable weight with value 521466 in Unity?
### Response:
int weight = 521466; |
2,498,846 | kk | Unity | var_decl | beginner | Unity тілінде 952033 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 952033; | ### Instruction:
Unity тілінде 952033 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 952033; |
68,012,667 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
27,731,325 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 330 простым. | public bool IsPrime() {
int n = 330;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 330 простым.
### Response:
public bool IsPrime() {
int n = 330;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,307,827 | en | Unity | logic_ops | intermediate | Write a function that determines if the number 77 is prime in Unity. | public bool IsPrime() {
int n = 77;
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 77 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 77;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
10,931,247 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
20,013,079 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2011 is a leap year in JavaScript. | function isLeap() {
let y = 2011;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2011 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2011;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,285,822 | en | JavaScript | var_decl | beginner | How to declare a variable total with value 850828 in JavaScript? | let total = 850828; | ### Instruction:
How to declare a variable total with value 850828 in JavaScript?
### Response:
let total = 850828; |
2,248,285 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 491216 мәнімен result айнымалысын қалай жариялауға болады? | let result = 491216; | ### Instruction:
JavaScript тілінде 491216 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
let result = 491216; |
462,863 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 2618. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2618)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 2618.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2618)); |
73,842,366 | en | Java | logic_ops | intermediate | Write a function that determines if the number 20 is prime in Java. | public bool IsPrime() {
int n = 20;
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 20 is prime in Java.
### Response:
public bool IsPrime() {
int n = 20;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,453,946 | en | Java | var_decl | beginner | How to declare a variable value with value 154268 in Java? | int value = 154268; | ### Instruction:
How to declare a variable value with value 154268 in Java?
### Response:
int value = 154268; |
77,285,310 | kk | Python | string_ops | intermediate | 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аеёиоуыэюя') |
44,871,782 | 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;
} |
85,990,047 | 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); |
4,926,377 | en | Java | var_decl | beginner | How to declare a variable weight with value 936263 in Java? | int weight = 936263; | ### Instruction:
How to declare a variable weight with value 936263 in Java?
### Response:
int weight = 936263; |
3,523,688 | kk | Python | var_decl | beginner | Python тілінде 415497 мәнімен x айнымалысын қалай жариялауға болады? | x = 415497 | ### Instruction:
Python тілінде 415497 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
x = 415497 |
4,778,457 | kk | Unity | var_decl | beginner | Unity тілінде 611779 мәнімен y айнымалысын қалай жариялауға болады? | int y = 611779; | ### Instruction:
Unity тілінде 611779 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 611779; |
21,522,253 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,135,267 | ru | JavaScript | var_decl | beginner | Как объявить переменную value со значением 598963 в JavaScript? | let value = 598963; | ### Instruction:
Как объявить переменную value со значением 598963 в JavaScript?
### Response:
let value = 598963; |
1,265,301 | en | C++ | var_decl | beginner | How to declare a variable speed with value 971876 in C++? | int speed = 971876; | ### Instruction:
How to declare a variable speed with value 971876 in C++?
### Response:
int speed = 971876; |
64,984,451 | 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;
} |
65,741,516 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
28,768,461 | ru | 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;
} |
1,419,176 | ru | Java | var_decl | beginner | Как объявить переменную rate со значением 54510 в Java? | int rate = 54510; | ### Instruction:
Как объявить переменную rate со значением 54510 в Java?
### Response:
int rate = 54510; |
57,323,548 | ru | 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);
} |
19,314,161 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2086 is a leap year in JavaScript. | function isLeap() {
let y = 2086;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2086 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2086;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
8,336 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 1326. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1326)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 1326.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(1326)) |
4,627,529 | en | Python | var_decl | beginner | How to declare a variable offset with value 494484 in Python? | offset = 494484 | ### Instruction:
How to declare a variable offset with value 494484 in Python?
### Response:
offset = 494484 |
679,495 | en | C++ | var_decl | beginner | How to declare a variable limit with value 117889 in C++? | int limit = 117889; | ### Instruction:
How to declare a variable limit with value 117889 in C++?
### Response:
int limit = 117889; |
82,516,497 | 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;
} |
92,061,046 | en | Java | string_ops | intermediate | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
51,480,114 | kk | Java | array_ops | advanced | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
375,356 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 1419. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1419) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 1419.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(1419) << std::endl; |
1,552,827 | kk | C# | var_decl | beginner | C# тілінде 416447 мәнімен x айнымалысын қалай жариялауға болады? | int x = 416447; | ### Instruction:
C# тілінде 416447 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 416447; |
39,745,411 | en | Python | logic_ops | advanced | Write a function that determines if the number 457 is prime in Python. | def is_prime():
n = 457
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 457 is prime in Python.
### Response:
def is_prime():
n = 457
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
28,091,549 | ru | Python | logic_ops | intermediate | Напишите на 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)) |
46,832,888 | 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);
} |
3,360,685 | en | Unity | var_decl | beginner | How to declare a variable health with value 15963 in Unity? | int health = 15963; | ### Instruction:
How to declare a variable health with value 15963 in Unity?
### Response:
int health = 15963; |
459,695 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1951. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1951)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 1951.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(1951)); |
28,959,293 | en | Java | logic_ops | intermediate | Write logic to check if the year 1902 is a leap year in Java. | public bool IsLeap() {
int y = 1902;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1902 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1902;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
58,565,516 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 440 простым. | def is_prime():
n = 440
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 440 простым.
### Response:
def is_prime():
n = 440
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
71,203,984 | kk | Unity | logic_ops | intermediate | Unity тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1910;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1910 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1910;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
29,041,049 | kk | C# | logic_ops | intermediate | C# тилінде 390 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 390;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 390 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 390;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
500,310 | kk | C# | var_decl | beginner | C# тілінде 587877 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 587877; | ### Instruction:
C# тілінде 587877 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 587877; |
31,883 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 7998. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7998)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 7998.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7998)); |
1,879,228 | ru | C# | var_decl | beginner | Как объявить переменную level со значением 756885 в C#? | int level = 756885; | ### Instruction:
Как объявить переменную level со значением 756885 в C#?
### Response:
int level = 756885; |
117,094 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 8333. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8333)); | ### Instruction:
Write a function in C# that calculates the factorial of 8333.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8333)); |
27,580,829 | en | Unity | array_ops | intermediate | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
51,845,550 | 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();
} |
17,531,168 | 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();
} |
4,423,353 | en | Java | var_decl | beginner | How to declare a variable rate with value 63049 in Java? | int rate = 63049; | ### Instruction:
How to declare a variable rate with value 63049 in Java?
### Response:
int rate = 63049; |
58,239,680 | 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;
} |
2,418,259 | ru | JavaScript | var_decl | beginner | Как объявить переменную value со значением 376028 в JavaScript? | let value = 376028; | ### Instruction:
Как объявить переменную value со значением 376028 в JavaScript?
### Response:
let value = 376028; |
1,989,551 | kk | Unity | var_decl | beginner | Unity тілінде 679472 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 679472; | ### Instruction:
Unity тілінде 679472 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 679472; |
68,062,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;
} |
575,370 | en | C++ | var_decl | beginner | How to declare a variable x with value 755751 in C++? | int x = 755751; | ### Instruction:
How to declare a variable x with value 755751 in C++?
### Response:
int x = 755751; |
2,895,377 | ru | JavaScript | var_decl | beginner | Как объявить переменную speed со значением 384615 в JavaScript? | let speed = 384615; | ### Instruction:
Как объявить переменную speed со значением 384615 в JavaScript?
### Response:
let speed = 384615; |
4,511,494 | ru | Python | var_decl | beginner | Как объявить переменную count со значением 738738 в Python? | count = 738738 | ### Instruction:
Как объявить переменную count со значением 738738 в Python?
### Response:
count = 738738 |
90,471,973 | 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;
} |
41,800,188 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
49,118,439 | en | Unity | logic_ops | advanced | Write a function that determines if the number 202 is prime in Unity. | public bool IsPrime() {
int n = 202;
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 202 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 202;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
25,453,357 | kk | Python | string_ops | intermediate | 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аеёиоуыэюя') |
37,736,063 | kk | Java | logic_ops | advanced | Java тилінде 2041 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2041;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2041 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2041;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
96,763,592 | kk | Python | string_ops | intermediate | 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аеёиоуыэюя') |
2,655,813 | kk | C++ | var_decl | beginner | C++ тілінде 41223 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 41223; | ### Instruction:
C++ тілінде 41223 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 41223; |
38,660,218 | en | Python | logic_ops | advanced | Write logic to check if the year 1931 is a leap year in Python. | def is_leap():
year = 1931
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1931 is a leap year in Python.
### Response:
def is_leap():
year = 1931
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
96,305,886 | en | Python | logic_ops | advanced | Write a function that determines if the number 219 is prime in Python. | def is_prime():
n = 219
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 219 is prime in Python.
### Response:
def is_prime():
n = 219
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
87,885,519 | kk | C# | string_ops | advanced | C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
19,424,690 | 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;
} |
30,654,016 | en | Unity | string_ops | intermediate | Write a function that counts vowels in a text in Unity. | 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 Unity.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
258,863 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 8207. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8207));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 8207.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(8207));
} |
4,220,442 | kk | C++ | var_decl | beginner | C++ тілінде 260754 мәнімен x айнымалысын қалай жариялауға болады? | int x = 260754; | ### Instruction:
C++ тілінде 260754 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 260754; |
19,137,295 | kk | Java | array_ops | advanced | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
72,576,994 | kk | 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;
} |
150,208 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 9343. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9343)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 9343.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9343)) |
41,211,924 | 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;
} |
92,095,559 | 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();
} |
18,141,186 | 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;
} |
61,788,871 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 97 простым. | public bool IsPrime() {
int n = 97;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 97 простым.
### Response:
public bool IsPrime() {
int n = 97;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
661,025 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 586-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(586)) | ### Instruction:
Python тілінде 1-ден 586-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(586)) |
281,968 | en | C++ | var_decl | beginner | How to declare a variable speed with value 611759 in C++? | int speed = 611759; | ### Instruction:
How to declare a variable speed with value 611759 in C++?
### Response:
int speed = 611759; |
3,553,419 | en | Python | var_decl | beginner | How to declare a variable weight with value 307687 in Python? | weight = 307687 | ### Instruction:
How to declare a variable weight with value 307687 in Python?
### Response:
weight = 307687 |
66,125,421 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
3,454,589 | kk | C++ | var_decl | beginner | C++ тілінде 667521 мәнімен score айнымалысын қалай жариялауға болады? | int score = 667521; | ### Instruction:
C++ тілінде 667521 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 667521; |
889,263 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 7288. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7288)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 7288.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7288)) |
40,705,073 | 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();
} |
53,354,246 | 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);
} |
2,551,432 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 255079 в Python? | score = 255079 | ### Instruction:
Как объявить переменную score со значением 255079 в Python?
### Response:
score = 255079 |
1,212,388 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 456771 в C++? | int timer = 456771; | ### Instruction:
Как объявить переменную timer со значением 456771 в C++?
### Response:
int timer = 456771; |
31,280,066 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
47,226,086 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.