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 |
|---|---|---|---|---|---|---|---|
555,456 | kk | C# | var_decl | beginner | C# тілінде 537516 мәнімен total айнымалысын қалай жариялауға болады? | int total = 537516; | ### Instruction:
C# тілінде 537516 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 537516; |
25,351,658 | en | Python | logic_ops | intermediate | Write a function that determines if the number 384 is prime in Python. | def is_prime():
n = 384
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 384 is prime in Python.
### Response:
def is_prime():
n = 384
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
3,102,532 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 128829 in JavaScript? | let limit = 128829; | ### Instruction:
How to declare a variable limit with value 128829 in JavaScript?
### Response:
let limit = 128829; |
10,332 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 807. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(807));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 807.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(807));
} |
239,292 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 7432-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7432)); | ### Instruction:
JavaScript тілінде 1-ден 7432-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(7432)); |
63,373,512 | en | C++ | string_ops | advanced | 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;
} |
817,319 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 285. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(285)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 285.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(285)); |
81,594,909 | en | C++ | string_ops | advanced | Write a function that counts vowels in a text in C++. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C++.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,821,981 | ru | C# | var_decl | beginner | Как объявить переменную amount со значением 62388 в C#? | int amount = 62388; | ### Instruction:
Как объявить переменную amount со значением 62388 в C#?
### Response:
int amount = 62388; |
68,168,588 | ru | 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;
} |
28,076,603 | kk | Unity | logic_ops | intermediate | Unity тилінде 180 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 180;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 180 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 180;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,481,634 | ru | C# | var_decl | beginner | Как объявить переменную weight со значением 342603 в C#? | int weight = 342603; | ### Instruction:
Как объявить переменную weight со значением 342603 в C#?
### Response:
int weight = 342603; |
72,593,604 | 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;
} |
24,351,741 | en | C++ | logic_ops | advanced | Write a function that determines if the number 32 is prime in C++. | public bool IsPrime() {
int n = 32;
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 32 is prime in C++.
### Response:
public bool IsPrime() {
int n = 32;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,647,937 | en | C# | var_decl | beginner | How to declare a variable data with value 514378 in C#? | int data = 514378; | ### Instruction:
How to declare a variable data with value 514378 in C#?
### Response:
int data = 514378; |
54,245,438 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 201 простым. | public bool IsPrime() {
int n = 201;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 201 простым.
### Response:
public bool IsPrime() {
int n = 201;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
98,953,841 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
3,732,002 | kk | Java | var_decl | beginner | Java тілінде 180745 мәнімен score айнымалысын қалай жариялауға болады? | int score = 180745; | ### Instruction:
Java тілінде 180745 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 180745; |
48,559,131 | en | JavaScript | array_ops | advanced | Write a function that finds the maximum number in an array in JavaScript. | const getMax = arr => Math.max(...arr); | ### Instruction:
Write a function that finds the maximum number in an array in JavaScript.
### Response:
const getMax = arr => Math.max(...arr); |
455,411 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 2782. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2782));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 2782.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(2782));
} |
4,312,537 | kk | Python | var_decl | beginner | Python тілінде 902517 мәнімен index айнымалысын қалай жариялауға болады? | index = 902517 | ### Instruction:
Python тілінде 902517 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
index = 902517 |
769,544 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 293421 в JavaScript? | let total = 293421; | ### Instruction:
Как объявить переменную total со значением 293421 в JavaScript?
### Response:
let total = 293421; |
86,835,159 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | 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 Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,786,204 | en | Unity | var_decl | beginner | How to declare a variable index with value 681644 in Unity? | int index = 681644; | ### Instruction:
How to declare a variable index with value 681644 in Unity?
### Response:
int index = 681644; |
31,532,792 | kk | C++ | array_ops | advanced | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
2,539,551 | en | Python | var_decl | beginner | How to declare a variable weight with value 171189 in Python? | weight = 171189 | ### Instruction:
How to declare a variable weight with value 171189 in Python?
### Response:
weight = 171189 |
4,174,090 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 912599 в Unity? | int rate = 912599; | ### Instruction:
Как объявить переменную rate со значением 912599 в Unity?
### Response:
int rate = 912599; |
2,948,580 | ru | Java | var_decl | beginner | Как объявить переменную total со значением 52912 в Java? | int total = 52912; | ### Instruction:
Как объявить переменную total со значением 52912 в Java?
### Response:
int total = 52912; |
2,925,181 | ru | Java | var_decl | beginner | Как объявить переменную index со значением 482187 в Java? | int index = 482187; | ### Instruction:
Как объявить переменную index со значением 482187 в Java?
### Response:
int index = 482187; |
45,238,138 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 150 простым. | public bool IsPrime() {
int n = 150;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 150 простым.
### Response:
public bool IsPrime() {
int n = 150;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
87,143,621 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1979 is a leap year in JavaScript. | function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1979 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
65,890,313 | 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;
} |
2,523,257 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 701931 в C++? | int timer = 701931; | ### Instruction:
Как объявить переменную timer со значением 701931 в C++?
### Response:
int timer = 701931; |
2,607,442 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 429911 мәнімен count айнымалысын қалай жариялауға болады? | let count = 429911; | ### Instruction:
JavaScript тілінде 429911 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
let count = 429911; |
12,944,540 | kk | Java | string_ops | intermediate | Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,085,651 | kk | JavaScript | factorial | advanced | JavaScript тілінде 7362 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(7362)); | ### Instruction:
JavaScript тілінде 7362 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(7362)); |
2,347,647 | en | Java | var_decl | beginner | How to declare a variable index with value 787895 in Java? | int index = 787895; | ### Instruction:
How to declare a variable index with value 787895 in Java?
### Response:
int index = 787895; |
3,532,173 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 390101 мәнімен weight айнымалысын қалай жариялауға болады? | let weight = 390101; | ### Instruction:
JavaScript тілінде 390101 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
let weight = 390101; |
78,926,887 | kk | 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;
} |
100,624 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 6290. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6290)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 6290.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(6290)); |
176,002 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 4062. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4062)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 4062.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(4062)); |
93,431,430 | 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);
} |
83,706,071 | kk | Python | array_ops | advanced | 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] |
1,948,451 | en | JavaScript | var_decl | beginner | How to declare a variable offset with value 860579 in JavaScript? | let offset = 860579; | ### Instruction:
How to declare a variable offset with value 860579 in JavaScript?
### Response:
let offset = 860579; |
74,289,109 | en | Python | logic_ops | advanced | Write logic to check if the year 2069 is a leap year in Python. | def is_leap():
year = 2069
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2069 is a leap year in Python.
### Response:
def is_leap():
year = 2069
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,116,981 | en | JavaScript | var_decl | beginner | How to declare a variable buffer with value 14442 in JavaScript? | let buffer = 14442; | ### Instruction:
How to declare a variable buffer with value 14442 in JavaScript?
### Response:
let buffer = 14442; |
23,800,052 | kk | C# | array_ops | advanced | C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
207,119 | en | Python | var_decl | beginner | How to declare a variable buffer with value 191841 in Python? | buffer = 191841 | ### Instruction:
How to declare a variable buffer with value 191841 in Python?
### Response:
buffer = 191841 |
40,883,626 | 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;
} |
605,874 | en | Python | var_decl | beginner | How to declare a variable level with value 832677 in Python? | level = 832677 | ### Instruction:
How to declare a variable level with value 832677 in Python?
### Response:
level = 832677 |
97,902 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 6291. | 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(6291) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 6291.
### 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(6291) << std::endl; |
2,408,395 | en | Unity | var_decl | beginner | How to declare a variable size with value 880361 in Unity? | int size = 880361; | ### Instruction:
How to declare a variable size with value 880361 in Unity?
### Response:
int size = 880361; |
76,646,609 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
46,803,402 | en | Java | string_ops | intermediate | Write a function that checks if a string is a palindrome in Java. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in Java.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
77,417,443 | kk | C# | logic_ops | intermediate | C# тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1937;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1937 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1937;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
57,829 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 6406-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6406)); | ### Instruction:
C# тілінде 1-ден 6406-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6406)); |
90,493,512 | en | Java | logic_ops | intermediate | Write logic to check if the year 1909 is a leap year in Java. | public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1909 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1909;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
11,534,633 | kk | C++ | logic_ops | intermediate | C++ тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1949;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1949 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1949;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
32,033,390 | en | Java | string_ops | advanced | 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();
} |
93,715,054 | kk | 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;
} |
82,744,072 | 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;
} |
51,640,003 | en | JavaScript | array_ops | intermediate | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
477,587 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 5421. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5421));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 5421.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5421));
} |
98,019,777 | 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;
} |
3,922,400 | en | Java | var_decl | beginner | How to declare a variable level with value 866645 in Java? | int level = 866645; | ### Instruction:
How to declare a variable level with value 866645 in Java?
### Response:
int level = 866645; |
850,552 | ru | Java | var_decl | beginner | Как объявить переменную y со значением 360255 в Java? | int y = 360255; | ### Instruction:
Как объявить переменную y со значением 360255 в Java?
### Response:
int y = 360255; |
99,337,108 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
95,556,061 | 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);
} |
99,885,593 | en | Python | array_ops | intermediate | Write a function that filters only even numbers from a list in Python. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Write a function that filters only even numbers from a list in Python.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
21,101,249 | en | C# | logic_ops | intermediate | Write a function that determines if the number 144 is prime in C#. | public bool IsPrime() {
int n = 144;
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 144 is prime in C#.
### Response:
public bool IsPrime() {
int n = 144;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
21,071,568 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
3,615,959 | kk | C++ | var_decl | beginner | C++ тілінде 782496 мәнімен size айнымалысын қалай жариялауға болады? | int size = 782496; | ### Instruction:
C++ тілінде 782496 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 782496; |
3,593,154 | en | JavaScript | var_decl | beginner | How to declare a variable health with value 970433 in JavaScript? | let health = 970433; | ### Instruction:
How to declare a variable health with value 970433 in JavaScript?
### Response:
let health = 970433; |
304,768 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 469. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(469)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 469.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(469)); |
46,190,718 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
1,563,564 | en | C# | var_decl | beginner | How to declare a variable y with value 996611 in C#? | int y = 996611; | ### Instruction:
How to declare a variable y with value 996611 in C#?
### Response:
int y = 996611; |
58,680,303 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 2008 високосным. | public bool IsLeap() {
int y = 2008;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2008 високосным.
### Response:
public bool IsLeap() {
int y = 2008;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
426,029 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 7778. | 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(7778) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 7778.
### 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(7778) << std::endl; |
24,608,896 | 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();
} |
950,951 | en | C++ | var_decl | beginner | How to declare a variable result with value 453633 in C++? | int result = 453633; | ### Instruction:
How to declare a variable result with value 453633 in C++?
### Response:
int result = 453633; |
73,946,741 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
917,126 | en | C# | var_decl | beginner | How to declare a variable value with value 56774 in C#? | int value = 56774; | ### Instruction:
How to declare a variable value with value 56774 in C#?
### Response:
int value = 56774; |
27,590,998 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
94,445,842 | 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;
} |
52,805,398 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 137 простым. | public bool IsPrime() {
int n = 137;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 137 простым.
### Response:
public bool IsPrime() {
int n = 137;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
51,514,282 | 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;
} |
2,709,633 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 795697 в JavaScript? | let index = 795697; | ### Instruction:
Как объявить переменную index со значением 795697 в JavaScript?
### Response:
let index = 795697; |
2,452,443 | en | C# | var_decl | beginner | How to declare a variable index with value 429000 in C#? | int index = 429000; | ### Instruction:
How to declare a variable index with value 429000 in C#?
### Response:
int index = 429000; |
33,201 | ru | Unity | var_decl | beginner | Как объявить переменную weight со значением 373159 в Unity? | int weight = 373159; | ### Instruction:
Как объявить переменную weight со значением 373159 в Unity?
### Response:
int weight = 373159; |
14,309,990 | kk | JavaScript | array_ops | intermediate | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
58,788,630 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 190 is prime in JavaScript. | function isPrime() {
let n = 190;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 190 is prime in JavaScript.
### Response:
function isPrime() {
let n = 190;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
2,516,421 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 302965 в C++? | int timer = 302965; | ### Instruction:
Как объявить переменную timer со значением 302965 в C++?
### Response:
int timer = 302965; |
83,761,745 | ru | 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);
} |
34,718,172 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Java функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
3,744,890 | kk | Java | var_decl | beginner | Java тілінде 882452 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 882452; | ### Instruction:
Java тілінде 882452 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 882452; |
80,351,182 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2065 високосным. | function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2065 високосным.
### Response:
function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
2,697,465 | ru | Python | var_decl | beginner | Как объявить переменную index со значением 137547 в Python? | index = 137547 | ### Instruction:
Как объявить переменную index со значением 137547 в Python?
### Response:
index = 137547 |
12,565,272 | kk | Python | logic_ops | intermediate | Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 66
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 66 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 66
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
94,127,286 | en | Unity | logic_ops | advanced | Write logic to check if the year 1991 is a leap year in Unity. | public bool IsLeap() {
int y = 1991;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1991 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1991;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
20,726,760 | kk | C# | logic_ops | advanced | C# тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2084 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.