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 |
|---|---|---|---|---|---|---|---|
4,239,202 | en | Unity | var_decl | beginner | How to declare a variable timer with value 215685 in Unity? | int timer = 215685; | ### Instruction:
How to declare a variable timer with value 215685 in Unity?
### Response:
int timer = 215685; |
4,327,910 | kk | Java | var_decl | beginner | Java тілінде 265221 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 265221; | ### Instruction:
Java тілінде 265221 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 265221; |
37,258,512 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2000 високосным. | function isLeap() {
let y = 2000;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2000 високосным.
### Response:
function isLeap() {
let y = 2000;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
414,515 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 5984. | 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(5984) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 5984.
### 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(5984) << std::endl; |
27,535,626 | ru | Java | array_ops | advanced | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,578,944 | ru | C# | var_decl | beginner | Как объявить переменную amount со значением 720812 в C#? | int amount = 720812; | ### Instruction:
Как объявить переменную amount со значением 720812 в C#?
### Response:
int amount = 720812; |
52,075,109 | 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;
} |
16,756,714 | 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);
} |
474,140 | en | Python | var_decl | beginner | How to declare a variable total with value 899786 in Python? | total = 899786 | ### Instruction:
How to declare a variable total with value 899786 in Python?
### Response:
total = 899786 |
78,366,219 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 151 простым. | public bool IsPrime() {
int n = 151;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 151 простым.
### Response:
public bool IsPrime() {
int n = 151;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
86,093,440 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 1963 is a leap year in JavaScript. | function isLeap() {
let y = 1963;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1963 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1963;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
96,132,591 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая фильтрует только четные числа из списка. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Напишите на Python функцию, которая фильтрует только четные числа из списка.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
42,531,084 | 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();
} |
58,083,914 | 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();
} |
960,073 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 403345 в Unity? | int data = 403345; | ### Instruction:
Как объявить переменную data со значением 403345 в Unity?
### Response:
int data = 403345; |
58,585,351 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 2090 is a leap year in JavaScript. | function isLeap() {
let y = 2090;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2090 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2090;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
394,048 | en | JavaScript | factorial | advanced | Write a function in JavaScript that calculates the factorial of 4894. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4894)); | ### Instruction:
Write a function in JavaScript that calculates the factorial of 4894.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4894)); |
11,489,886 | en | Unity | string_ops | advanced | 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;
} |
581,028 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 972. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(972)); | ### Instruction:
Write a function in Java that calculates the factorial of 972.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(972)); |
65,218,516 | kk | 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;
} |
69,635,607 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 380 is prime in JavaScript. | function isPrime() {
let n = 380;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 380 is prime in JavaScript.
### Response:
function isPrime() {
let n = 380;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
10,481,447 | kk | Java | logic_ops | intermediate | Java тилінде 210 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 210;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 210 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 210;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
10,450,193 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 8 простым. | function isPrime() {
let n = 8;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 8 простым.
### Response:
function isPrime() {
let n = 8;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
942,596 | en | Java | var_decl | beginner | How to declare a variable value with value 504126 in Java? | int value = 504126; | ### Instruction:
How to declare a variable value with value 504126 in Java?
### Response:
int value = 504126; |
82,045,739 | en | Java | logic_ops | advanced | Write a function that determines if the number 107 is prime in Java. | public bool IsPrime() {
int n = 107;
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 107 is prime in Java.
### Response:
public bool IsPrime() {
int n = 107;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
26,386,014 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая разворачивает список задом наперед. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Напишите на JavaScript функцию, которая разворачивает список задом наперед.
### Response:
const reverseArr = arr => arr.reverse(); |
85,240,378 | en | C# | logic_ops | advanced | Write a function that determines if the number 97 is prime in C#. | 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:
Write a function that determines if the number 97 is prime in C#.
### 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;
} |
1,615,254 | kk | C# | var_decl | beginner | C# тілінде 408754 мәнімен count айнымалысын қалай жариялауға болады? | int count = 408754; | ### Instruction:
C# тілінде 408754 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
int count = 408754; |
46,379,323 | kk | Unity | logic_ops | intermediate | Unity тилінде 93 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 93;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 93 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 93;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,585,477 | ru | C# | var_decl | beginner | Как объявить переменную limit со значением 617561 в C#? | int limit = 617561; | ### Instruction:
Как объявить переменную limit со значением 617561 в C#?
### Response:
int limit = 617561; |
2,339,626 | kk | C++ | var_decl | beginner | C++ тілінде 153126 мәнімен total айнымалысын қалай жариялауға болады? | int total = 153126; | ### Instruction:
C++ тілінде 153126 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 153126; |
4,281,313 | en | Unity | var_decl | beginner | How to declare a variable y with value 267823 in Unity? | int y = 267823; | ### Instruction:
How to declare a variable y with value 267823 in Unity?
### Response:
int y = 267823; |
50,536,362 | 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);
} |
84,205,800 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1947 високосным. | public bool IsLeap() {
int y = 1947;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1947 високосным.
### Response:
public bool IsLeap() {
int y = 1947;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,296,088 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 909694 в Python? | index = 909694 | ### Instruction:
Как объявить переменную index со значением 909694 в Python?
### Response:
index = 909694 |
11,593,879 | kk | Unity | logic_ops | intermediate | Unity тилінде 68 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 68;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 68 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 68;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,236,005 | en | C# | var_decl | beginner | How to declare a variable buffer with value 413587 in C#? | int buffer = 413587; | ### Instruction:
How to declare a variable buffer with value 413587 in C#?
### Response:
int buffer = 413587; |
63,025,025 | 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; |
55,306,186 | en | Unity | array_ops | intermediate | Write a function that finds the maximum number in an array in Unity. | 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 Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
29,593 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 6171. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6171)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 6171.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6171)); |
2,145,561 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 336221 в C++? | int result = 336221; | ### Instruction:
Как объявить переменную result со значением 336221 в C++?
### Response:
int result = 336221; |
17,227,406 | ru | 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аеёиоуыэюя') |
25,907,217 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
88,184,471 | 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);
} |
73,463,755 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
84,876,630 | en | Java | array_ops | intermediate | Write a function that filters only even numbers from a list in Java. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Java.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
515,887 | kk | C# | var_decl | beginner | C# тілінде 31949 мәнімен data айнымалысын қалай жариялауға болады? | int data = 31949; | ### Instruction:
C# тілінде 31949 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 31949; |
1,189,172 | ru | Java | var_decl | beginner | Как объявить переменную value со значением 975544 в Java? | int value = 975544; | ### Instruction:
Как объявить переменную value со значением 975544 в Java?
### Response:
int value = 975544; |
94,989,179 | 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;
} |
312,494 | ru | C++ | var_decl | beginner | Как объявить переменную limit со значением 125864 в C++? | int limit = 125864; | ### Instruction:
Как объявить переменную limit со значением 125864 в C++?
### Response:
int limit = 125864; |
59,766,751 | 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();
} |
33,692,541 | en | Java | logic_ops | intermediate | Write logic to check if the year 2042 is a leap year in Java. | public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2042 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,237,749 | ru | Unity | var_decl | beginner | Как объявить переменную weight со значением 710774 в Unity? | int weight = 710774; | ### Instruction:
Как объявить переменную weight со значением 710774 в Unity?
### Response:
int weight = 710774; |
80,198,918 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая находит максимальное число в массиве. | def get_max(arr):
return max(arr) | ### Instruction:
Напишите на Python функцию, которая находит максимальное число в массиве.
### Response:
def get_max(arr):
return max(arr) |
66,885,348 | 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); |
60,754,117 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
4,681,705 | ru | Python | var_decl | beginner | Как объявить переменную weight со значением 437516 в Python? | weight = 437516 | ### Instruction:
Как объявить переменную weight со значением 437516 в Python?
### Response:
weight = 437516 |
585,437 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 5720. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5720)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 5720.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(5720)); |
77,961,703 | ru | 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;
} |
43,552 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 1019. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1019)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 1019.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1019)); |
38,274,651 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2077 is a leap year in Unity. | public bool IsLeap() {
int y = 2077;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2077 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2077;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,681,345 | en | Unity | var_decl | beginner | How to declare a variable offset with value 822860 in Unity? | int offset = 822860; | ### Instruction:
How to declare a variable offset with value 822860 in Unity?
### Response:
int offset = 822860; |
4,855,234 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 178325 в C#? | int health = 178325; | ### Instruction:
Как объявить переменную health со значением 178325 в C#?
### Response:
int health = 178325; |
14,074,804 | 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,736,615 | en | Unity | array_ops | intermediate | Write a function that finds the maximum number in an array in Unity. | 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 Unity.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
66,912,844 | en | C# | logic_ops | intermediate | Write logic to check if the year 2100 is a leap year in C#. | public bool IsLeap() {
int y = 2100;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2100 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2100;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
329,690 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 4996. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4996));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 4996.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4996));
} |
35,894,718 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
3,931,751 | kk | C++ | var_decl | beginner | C++ тілінде 530479 мәнімен index айнымалысын қалай жариялауға болады? | int index = 530479; | ### Instruction:
C++ тілінде 530479 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 530479; |
24,597,003 | 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);
} |
29,766 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 7133. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7133)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 7133.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(7133)); |
57,105,312 | 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;
} |
29,939,636 | kk | C++ | string_ops | intermediate | C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,414,084 | en | C# | var_decl | beginner | How to declare a variable score with value 63143 in C#? | int score = 63143; | ### Instruction:
How to declare a variable score with value 63143 in C#?
### Response:
int score = 63143; |
1,666,532 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 887563 мәнімен count айнымалысын қалай жариялауға болады? | let count = 887563; | ### Instruction:
JavaScript тілінде 887563 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
let count = 887563; |
94,730,572 | en | C# | logic_ops | intermediate | Write logic to check if the year 2016 is a leap year in C#. | public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2016 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2016;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
89,757,246 | 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;
} |
3,253,341 | en | Python | var_decl | beginner | How to declare a variable amount with value 349066 in Python? | amount = 349066 | ### Instruction:
How to declare a variable amount with value 349066 in Python?
### Response:
amount = 349066 |
14,340,114 | kk | Unity | string_ops | advanced | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,243,857 | en | Java | var_decl | beginner | How to declare a variable value with value 285481 in Java? | int value = 285481; | ### Instruction:
How to declare a variable value with value 285481 in Java?
### Response:
int value = 285481; |
37,263,459 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1959 високосным. | public bool IsLeap() {
int y = 1959;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1959 високосным.
### Response:
public bool IsLeap() {
int y = 1959;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,742,632 | en | JavaScript | var_decl | beginner | How to declare a variable result with value 347494 in JavaScript? | let result = 347494; | ### Instruction:
How to declare a variable result with value 347494 in JavaScript?
### Response:
let result = 347494; |
874,227 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 9050. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9050)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 9050.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9050)); |
24,359,683 | en | Unity | string_ops | advanced | 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;
} |
218,693 | en | Java | factorial | advanced | Write a function in Java that calculates the factorial of 2400. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2400)); | ### Instruction:
Write a function in Java that calculates the factorial of 2400.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2400)); |
3,968,346 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 16400 мәнімен y айнымалысын қалай жариялауға болады? | let y = 16400; | ### Instruction:
JavaScript тілінде 16400 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
let y = 16400; |
69,065,893 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 367 простым. | public bool IsPrime() {
int n = 367;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 367 простым.
### Response:
public bool IsPrime() {
int n = 367;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,380,334 | en | C# | var_decl | beginner | How to declare a variable data with value 863099 in C#? | int data = 863099; | ### Instruction:
How to declare a variable data with value 863099 in C#?
### Response:
int data = 863099; |
38,076,144 | kk | Java | logic_ops | advanced | Java тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2045 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2045;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,297,089 | ru | C++ | var_decl | beginner | Как объявить переменную score со значением 712623 в C++? | int score = 712623; | ### Instruction:
Как объявить переменную score со значением 712623 в C++?
### Response:
int score = 712623; |
90,543,049 | 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;
} |
4,998,729 | kk | Java | var_decl | beginner | Java тілінде 213091 мәнімен data айнымалысын қалай жариялауға болады? | int data = 213091; | ### Instruction:
Java тілінде 213091 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 213091; |
3,117,826 | ru | Python | var_decl | beginner | Как объявить переменную value со значением 302439 в Python? | value = 302439 | ### Instruction:
Как объявить переменную value со значением 302439 в Python?
### Response:
value = 302439 |
1,144,177 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 57778 мәнімен data айнымалысын қалай жариялауға болады? | let data = 57778; | ### Instruction:
JavaScript тілінде 57778 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
let data = 57778; |
90,113,015 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
1,477,601 | ru | C# | var_decl | beginner | Как объявить переменную y со значением 696378 в C#? | int y = 696378; | ### Instruction:
Как объявить переменную y со значением 696378 в C#?
### Response:
int y = 696378; |
20,760,930 | 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;
} |
51,044,660 | kk | C# | array_ops | advanced | C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C# тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,610,115 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 893075 в Unity? | int score = 893075; | ### Instruction:
Как объявить переменную score со значением 893075 в Unity?
### Response:
int score = 893075; |
29,622,399 | en | C# | string_ops | intermediate | Write a function that checks if a string is a palindrome in 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:
Write a function that checks if a string is a palindrome in 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;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.