id int64 0 100M | language stringclasses 3
values | prog_lang stringclasses 6
values | category stringclasses 10
values | difficulty stringclasses 3
values | instruction stringlengths 30 86 | output stringlengths 7 192 | text stringlengths 92 300 |
|---|---|---|---|---|---|---|---|
3,698,271 | en | Unity | var_decl | beginner | How to declare a variable index with value 592131 in Unity? | int index = 592131; | ### Instruction:
How to declare a variable index with value 592131 in Unity?
### Response:
int index = 592131; |
18,970,992 | 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();
} |
888,895 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 2048. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2048));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 2048.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2048));
} |
41,211,603 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
456,749 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 5450. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5450)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 5450.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5450)); |
1,772,339 | en | Unity | var_decl | beginner | How to declare a variable speed with value 334548 in Unity? | int speed = 334548; | ### Instruction:
How to declare a variable speed with value 334548 in Unity?
### Response:
int speed = 334548; |
2,122,267 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 806754 в C#? | int health = 806754; | ### Instruction:
Как объявить переменную health со значением 806754 в C#?
### Response:
int health = 806754; |
3,841,600 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 269430 в Python? | index = 269430 | ### Instruction:
Как объявить переменную index со значением 269430 в Python?
### Response:
index = 269430 |
2,728,749 | kk | C# | var_decl | beginner | C# тілінде 163948 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 163948; | ### Instruction:
C# тілінде 163948 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 163948; |
63,377,032 | 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;
} |
180,421 | kk | C++ | var_decl | beginner | C++ тілінде 612520 мәнімен total айнымалысын қалай жариялауға болады? | int total = 612520; | ### Instruction:
C++ тілінде 612520 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 612520; |
34,244,697 | en | C# | logic_ops | intermediate | Write logic to check if the year 1970 is a leap year in C#. | public bool IsLeap() {
int y = 1970;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1970 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1970;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
168,887 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 6851. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6851));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 6851.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6851));
} |
35,601,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;
} |
1,065,487 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 5690. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5690));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 5690.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5690));
} |
89,587,848 | kk | Unity | logic_ops | intermediate | Unity тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1999 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1999;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
42,826,176 | 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;
} |
268,521 | en | JavaScript | var_decl | beginner | How to declare a variable amount with value 678512 in JavaScript? | let amount = 678512; | ### Instruction:
How to declare a variable amount with value 678512 in JavaScript?
### Response:
let amount = 678512; |
4,255,124 | en | Python | var_decl | beginner | How to declare a variable buffer with value 31751 in Python? | buffer = 31751 | ### Instruction:
How to declare a variable buffer with value 31751 in Python?
### Response:
buffer = 31751 |
4,417,398 | kk | Unity | var_decl | beginner | Unity тілінде 859520 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 859520; | ### Instruction:
Unity тілінде 859520 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 859520; |
52,141,215 | 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(); |
38,383,759 | kk | C++ | logic_ops | advanced | C++ тилінде 214 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 214;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 214 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 214;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
59,136,889 | en | Python | logic_ops | advanced | Write logic to check if the year 2089 is a leap year in Python. | def is_leap():
year = 2089
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2089 is a leap year in Python.
### Response:
def is_leap():
year = 2089
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
672,130 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 6148. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6148)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 6148.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6148)); |
49,007,097 | kk | C++ | logic_ops | advanced | C++ тилінде 1909 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1909 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,270,737 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 616330 мәнімен x айнымалысын қалай жариялауға болады? | let x = 616330; | ### Instruction:
JavaScript тілінде 616330 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 616330; |
30,575,578 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2037 високосным. | public bool IsLeap() {
int y = 2037;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2037 високосным.
### Response:
public bool IsLeap() {
int y = 2037;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
33,174 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 6969. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6969)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 6969.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6969)); |
1,079,083 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 677556 в C++? | int y = 677556; | ### Instruction:
Как объявить переменную y со значением 677556 в C++?
### Response:
int y = 677556; |
63,751,063 | kk | C# | logic_ops | advanced | C# тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,586,946 | en | JavaScript | var_decl | beginner | How to declare a variable result with value 930171 in JavaScript? | let result = 930171; | ### Instruction:
How to declare a variable result with value 930171 in JavaScript?
### Response:
let result = 930171; |
20,872,596 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
1,706,317 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 163745 в Unity? | int value = 163745; | ### Instruction:
Как объявить переменную value со значением 163745 в Unity?
### Response:
int value = 163745; |
58,967,377 | 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);
} |
212,300 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 2385. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2385)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 2385.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2385)); |
814,015 | en | C# | var_decl | beginner | How to declare a variable value with value 675839 in C#? | int value = 675839; | ### Instruction:
How to declare a variable value with value 675839 in C#?
### Response:
int value = 675839; |
82,542,034 | kk | C# | logic_ops | intermediate | C# тилінде 483 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 483;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 483 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 483;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
86,951,230 | 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(); |
24,774,921 | 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);
} |
1,811,418 | en | C++ | var_decl | beginner | How to declare a variable score with value 815990 in C++? | int score = 815990; | ### Instruction:
How to declare a variable score with value 815990 in C++?
### Response:
int score = 815990; |
67,470,258 | en | Python | logic_ops | advanced | Write a function that determines if the number 169 is prime in Python. | def is_prime():
n = 169
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 169 is prime in Python.
### Response:
def is_prime():
n = 169
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
1,974,893 | kk | Java | var_decl | beginner | Java тілінде 64936 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 64936; | ### Instruction:
Java тілінде 64936 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 64936; |
48,021,608 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1969 is a leap year in C++. | public bool IsLeap() {
int y = 1969;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1969 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1969;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
26,584,801 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1902 високосным. | def is_leap():
year = 1902
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1902 високосным.
### Response:
def is_leap():
year = 1902
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
3,968,982 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 959790 в Unity? | int data = 959790; | ### Instruction:
Как объявить переменную data со значением 959790 в Unity?
### Response:
int data = 959790; |
74,055,965 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 462 простым. | public bool IsPrime() {
int n = 462;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 462 простым.
### Response:
public bool IsPrime() {
int n = 462;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
379,906 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 9998. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9998)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 9998.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9998)); |
62,015,828 | 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(); |
568,039 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 7113. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7113)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 7113.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7113)); |
1,090,070 | en | Unity | var_decl | beginner | How to declare a variable x with value 714393 in Unity? | int x = 714393; | ### Instruction:
How to declare a variable x with value 714393 in Unity?
### Response:
int x = 714393; |
293,849 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 9625. | 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(9625) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 9625.
### 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(9625) << std::endl; |
357,797 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2689. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2689)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 2689.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2689)); |
54,512,324 | 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);
} |
79,876,240 | 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;
} |
46,232,344 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
3,907,234 | ru | Java | var_decl | beginner | Как объявить переменную offset со значением 707145 в Java? | int offset = 707145; | ### Instruction:
Как объявить переменную offset со значением 707145 в Java?
### Response:
int offset = 707145; |
2,297,861 | en | C++ | var_decl | beginner | How to declare a variable total with value 617565 in C++? | int total = 617565; | ### Instruction:
How to declare a variable total with value 617565 in C++?
### Response:
int total = 617565; |
4,602,922 | en | JavaScript | var_decl | beginner | How to declare a variable timer with value 58926 in JavaScript? | let timer = 58926; | ### Instruction:
How to declare a variable timer with value 58926 in JavaScript?
### Response:
let timer = 58926; |
47,152,852 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
642,536 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 6736. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6736)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 6736.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6736)); |
3,988,006 | ru | C++ | var_decl | beginner | Как объявить переменную x со значением 734009 в C++? | int x = 734009; | ### Instruction:
Как объявить переменную x со значением 734009 в C++?
### Response:
int x = 734009; |
97,138,653 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 2018 високосным. | public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2018 високосным.
### Response:
public bool IsLeap() {
int y = 2018;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
69,327,319 | 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;
} |
94,369,873 | kk | Java | array_ops | intermediate | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
38,811,143 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 300;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 300;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,951,523 | en | Unity | var_decl | beginner | How to declare a variable score with value 456935 in Unity? | int score = 456935; | ### Instruction:
How to declare a variable score with value 456935 in Unity?
### Response:
int score = 456935; |
3,430,535 | ru | Unity | var_decl | beginner | Как объявить переменную offset со значением 449363 в Unity? | int offset = 449363; | ### Instruction:
Как объявить переменную offset со значением 449363 в Unity?
### Response:
int offset = 449363; |
51,435,381 | ru | Python | logic_ops | intermediate | Напишите на Python логику проверки, является ли год 1984 високосным. | def is_leap():
year = 1984
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1984 високосным.
### Response:
def is_leap():
year = 1984
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,804,572 | ru | Python | var_decl | beginner | Как объявить переменную value со значением 252449 в Python? | value = 252449 | ### Instruction:
Как объявить переменную value со значением 252449 в Python?
### Response:
value = 252449 |
1,521,423 | ru | C++ | var_decl | beginner | Как объявить переменную data со значением 288435 в C++? | int data = 288435; | ### Instruction:
Как объявить переменную data со значением 288435 в C++?
### Response:
int data = 288435; |
21,289,365 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 314 простым. | public bool IsPrime() {
int n = 314;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 314 простым.
### Response:
public bool IsPrime() {
int n = 314;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
85,092,847 | en | Python | logic_ops | intermediate | Write a function that determines if the number 427 is prime in Python. | def is_prime():
n = 427
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 427 is prime in Python.
### Response:
def is_prime():
n = 427
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,247,294 | kk | Java | var_decl | beginner | Java тілінде 13868 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 13868; | ### Instruction:
Java тілінде 13868 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 13868; |
3,806,394 | en | Python | var_decl | beginner | How to declare a variable y with value 463291 in Python? | y = 463291 | ### Instruction:
How to declare a variable y with value 463291 in Python?
### Response:
y = 463291 |
11,855 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 4916. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4916)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 4916.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4916)); |
29,398,337 | 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;
} |
3,690,727 | ru | JavaScript | var_decl | beginner | Как объявить переменную health со значением 953533 в JavaScript? | let health = 953533; | ### Instruction:
Как объявить переменную health со значением 953533 в JavaScript?
### Response:
let health = 953533; |
38,909,695 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 285 простым. | def is_prime():
n = 285
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 285 простым.
### Response:
def is_prime():
n = 285
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
10,635,217 | en | Unity | array_ops | intermediate | 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);
} |
3,399,764 | en | Unity | var_decl | beginner | How to declare a variable timer with value 776178 in Unity? | int timer = 776178; | ### Instruction:
How to declare a variable timer with value 776178 in Unity?
### Response:
int timer = 776178; |
77,488,555 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 316 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 316;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 316 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 316;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
451,316 | kk | Java | factorial | advanced | Java тілінде 3552 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3552)); | ### Instruction:
Java тілінде 3552 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3552)); |
1,194,488 | ru | Java | var_decl | beginner | Как объявить переменную buffer со значением 521808 в Java? | int buffer = 521808; | ### Instruction:
Как объявить переменную buffer со значением 521808 в Java?
### Response:
int buffer = 521808; |
42,138,610 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
42,343,642 | 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;
} |
37,840 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 611. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(611));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 611.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(611));
} |
2,556,659 | en | C++ | var_decl | beginner | How to declare a variable y with value 952501 in C++? | int y = 952501; | ### Instruction:
How to declare a variable y with value 952501 in C++?
### Response:
int y = 952501; |
3,064,470 | en | Java | var_decl | beginner | How to declare a variable level with value 314360 in Java? | int level = 314360; | ### Instruction:
How to declare a variable level with value 314360 in Java?
### Response:
int level = 314360; |
91,860 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 8777. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8777));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 8777.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(8777));
} |
2,624,993 | en | Python | var_decl | beginner | How to declare a variable index with value 998636 in Python? | index = 998636 | ### Instruction:
How to declare a variable index with value 998636 in Python?
### Response:
index = 998636 |
32,131,873 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
35,279,922 | en | Unity | array_ops | intermediate | 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);
} |
3,965,043 | kk | C++ | var_decl | beginner | C++ тілінде 512957 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 512957; | ### Instruction:
C++ тілінде 512957 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 512957; |
1,742,170 | kk | Java | var_decl | beginner | Java тілінде 182160 мәнімен value айнымалысын қалай жариялауға болады? | int value = 182160; | ### Instruction:
Java тілінде 182160 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 182160; |
74,749,225 | 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;
} |
33,918,667 | 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;
} |
40,918,965 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
373,325 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 6686. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6686)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 6686.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6686)); |
4,694,584 | kk | C++ | var_decl | beginner | C++ тілінде 39838 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 39838; | ### Instruction:
C++ тілінде 39838 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 39838; |
74,153,341 | 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();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.