id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
3,679,562 | en | C# | var_decl | beginner | How to declare a variable count with value 282011 in C#? | int count = 282011; | ### Instruction:
How to declare a variable count with value 282011 in C#?
### Response:
int count = 282011; |
77,468,898 | 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;
} |
3,031,705 | en | Python | var_decl | beginner | How to declare a variable health with value 563100 in Python? | health = 563100 | ### Instruction:
How to declare a variable health with value 563100 in Python?
### Response:
health = 563100 |
29,947,451 | kk | C# | array_ops | advanced | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
80,218,219 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
865,632 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 289081 мәнімен timer айнымалысын қалай жариялауға болады? | let timer = 289081; | ### Instruction:
JavaScript тілінде 289081 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
let timer = 289081; |
1,302,924 | ru | Python | var_decl | beginner | Как объявить переменную limit со значением 446162 в Python? | limit = 446162 | ### Instruction:
Как объявить переменную limit со значением 446162 в Python?
### Response:
limit = 446162 |
1,873,109 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 733097 мәнімен size айнымалысын қалай жариялауға болады? | let size = 733097; | ### Instruction:
JavaScript тілінде 733097 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
let size = 733097; |
72,592,069 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
2,305,806 | kk | C# | var_decl | beginner | C# тілінде 516073 мәнімен index айнымалысын қалай жариялауға болады? | int index = 516073; | ### Instruction:
C# тілінде 516073 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 516073; |
157,885 | kk | JavaScript | factorial | advanced | JavaScript тілінде 3687 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3687)); | ### Instruction:
JavaScript тілінде 3687 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(3687)); |
55,462,581 | kk | Java | logic_ops | intermediate | Java тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
67,815,229 | 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;
} |
1,070,972 | ru | Python | var_decl | beginner | Как объявить переменную total со значением 863734 в Python? | total = 863734 | ### Instruction:
Как объявить переменную total со значением 863734 в Python?
### Response:
total = 863734 |
89,659,995 | 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();
} |
18,606,340 | 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аеёиоуыэюя') |
32,710,290 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
2,374,337 | kk | Unity | var_decl | beginner | Unity тілінде 603247 мәнімен x айнымалысын қалай жариялауға болады? | int x = 603247; | ### Instruction:
Unity тілінде 603247 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 603247; |
320,263 | ru | C# | var_decl | beginner | Как объявить переменную data со значением 166253 в C#? | int data = 166253; | ### Instruction:
Как объявить переменную data со значением 166253 в C#?
### Response:
int data = 166253; |
1,066,828 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 389737 мәнімен x айнымалысын қалай жариялауға болады? | let x = 389737; | ### Instruction:
JavaScript тілінде 389737 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
let x = 389737; |
14,393,507 | kk | C# | logic_ops | advanced | C# тилінде 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:
C# тилінде 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;
} |
65,131,447 | en | C# | string_ops | intermediate | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,425,149 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 623655 мәнімен score айнымалысын қалай жариялауға болады? | let score = 623655; | ### Instruction:
JavaScript тілінде 623655 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
let score = 623655; |
53,177,603 | 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);
} |
2,742,747 | ru | Python | var_decl | beginner | Как объявить переменную buffer со значением 449349 в Python? | buffer = 449349 | ### Instruction:
Как объявить переменную buffer со значением 449349 в Python?
### Response:
buffer = 449349 |
2,555,347 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 940645 в C++? | int rate = 940645; | ### Instruction:
Как объявить переменную rate со значением 940645 в C++?
### Response:
int rate = 940645; |
1,084,829 | kk | C++ | var_decl | beginner | C++ тілінде 913699 мәнімен x айнымалысын қалай жариялауға болады? | int x = 913699; | ### Instruction:
C++ тілінде 913699 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 913699; |
2,716,294 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 562403 in JavaScript? | let y = 562403; | ### Instruction:
How to declare a variable y with value 562403 in JavaScript?
### Response:
let y = 562403; |
29,335 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 9132-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9132)) | ### Instruction:
Python тілінде 1-ден 9132-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(9132)) |
93,978,003 | kk | C++ | logic_ops | advanced | C++ тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,356,634 | ru | Python | var_decl | beginner | Как объявить переменную size со значением 683255 в Python? | size = 683255 | ### Instruction:
Как объявить переменную size со значением 683255 в Python?
### Response:
size = 683255 |
89,169,148 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1972 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1972;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1972 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1972;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,843,599 | en | C++ | var_decl | beginner | How to declare a variable speed with value 128742 in C++? | int speed = 128742; | ### Instruction:
How to declare a variable speed with value 128742 in C++?
### Response:
int speed = 128742; |
16,366,176 | kk | C++ | logic_ops | advanced | C++ тилінде 1975 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1975;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 1975 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1975;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
519,640 | en | Unity | var_decl | beginner | How to declare a variable x with value 937704 in Unity? | int x = 937704; | ### Instruction:
How to declare a variable x with value 937704 in Unity?
### Response:
int x = 937704; |
52,356,533 | kk | C# | logic_ops | intermediate | C# тилінде 71 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 71;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 71 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 71;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
61,927 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 9577. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9577) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 9577.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(9577) << std::endl; |
64,477,979 | kk | 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;
} |
2,310,862 | en | C++ | var_decl | beginner | How to declare a variable index with value 121419 in C++? | int index = 121419; | ### Instruction:
How to declare a variable index with value 121419 in C++?
### Response:
int index = 121419; |
32,568,198 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Java функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
26,179,023 | en | C# | logic_ops | advanced | Write logic to check if the year 2002 is a leap year in C#. | public bool IsLeap() {
int y = 2002;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2002 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2002;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,813,596 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 72665 в Unity? | int count = 72665; | ### Instruction:
Как объявить переменную count со значением 72665 в Unity?
### Response:
int count = 72665; |
3,901,717 | ru | C++ | var_decl | beginner | Как объявить переменную weight со значением 329048 в C++? | int weight = 329048; | ### Instruction:
Как объявить переменную weight со значением 329048 в C++?
### Response:
int weight = 329048; |
44,520,924 | ru | Unity | array_ops | intermediate | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
4,022,641 | en | Python | var_decl | beginner | How to declare a variable value with value 922980 in Python? | value = 922980 | ### Instruction:
How to declare a variable value with value 922980 in Python?
### Response:
value = 922980 |
3,612,262 | kk | Unity | var_decl | beginner | Unity тілінде 86728 мәнімен x айнымалысын қалай жариялауға болады? | int x = 86728; | ### Instruction:
Unity тілінде 86728 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 86728; |
4,097,361 | en | JavaScript | var_decl | beginner | How to declare a variable limit with value 315878 in JavaScript? | let limit = 315878; | ### Instruction:
How to declare a variable limit with value 315878 in JavaScript?
### Response:
let limit = 315878; |
1,867,938 | kk | Java | var_decl | beginner | Java тілінде 5160 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 5160; | ### Instruction:
Java тілінде 5160 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 5160; |
4,469,896 | kk | Java | var_decl | beginner | Java тілінде 582800 мәнімен result айнымалысын қалай жариялауға болады? | int result = 582800; | ### Instruction:
Java тілінде 582800 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 582800; |
83,351,490 | en | Python | logic_ops | advanced | Write logic to check if the year 2019 is a leap year in Python. | def is_leap():
year = 2019
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2019 is a leap year in Python.
### Response:
def is_leap():
year = 2019
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
4,447,202 | en | C++ | var_decl | beginner | How to declare a variable limit with value 514568 in C++? | int limit = 514568; | ### Instruction:
How to declare a variable limit with value 514568 in C++?
### Response:
int limit = 514568; |
162,064 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 6080. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6080)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 6080.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6080)); |
4,542,084 | kk | Unity | var_decl | beginner | Unity тілінде 360675 мәнімен x айнымалысын қалай жариялауға болады? | int x = 360675; | ### Instruction:
Unity тілінде 360675 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 360675; |
10,491,561 | en | C++ | array_ops | intermediate | Write a function that finds the maximum number in an array in C++. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C++.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
35,645,377 | 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;
} |
530,943 | ru | JavaScript | sum_n | intermediate | Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9664. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9664)); | ### Instruction:
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9664.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(9664)); |
45,588,842 | kk | C++ | array_ops | advanced | C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C++ тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
33,277,345 | kk | Unity | array_ops | intermediate | 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;
} |
82,602,360 | 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); |
2,890,302 | ru | C++ | var_decl | beginner | Как объявить переменную offset со значением 135133 в C++? | int offset = 135133; | ### Instruction:
Как объявить переменную offset со значением 135133 в C++?
### Response:
int offset = 135133; |
12,859,688 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 396 простым. | public bool IsPrime() {
int n = 396;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 396 простым.
### Response:
public bool IsPrime() {
int n = 396;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,591,458 | kk | C# | var_decl | beginner | C# тілінде 160877 мәнімен size айнымалысын қалай жариялауға болады? | int size = 160877; | ### Instruction:
C# тілінде 160877 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 160877; |
50,954,808 | 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] |
95,056,264 | en | C++ | array_ops | intermediate | 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);
} |
36,321,010 | 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;
} |
54,478,267 | 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;
} |
34,946,191 | ru | Unity | array_ops | intermediate | Напишите на 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;
} |
722,742 | kk | Python | var_decl | beginner | Python тілінде 783636 мәнімен data айнымалысын қалай жариялауға болады? | data = 783636 | ### Instruction:
Python тілінде 783636 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
data = 783636 |
93,832,536 | 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;
} |
99,635,018 | en | Java | logic_ops | intermediate | Write logic to check if the year 2060 is a leap year in Java. | public bool IsLeap() {
int y = 2060;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2060 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2060;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
703,031 | en | Java | var_decl | beginner | How to declare a variable weight with value 962460 in Java? | int weight = 962460; | ### Instruction:
How to declare a variable weight with value 962460 in Java?
### Response:
int weight = 962460; |
29,959,298 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
14,406,723 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 266 простым. | def is_prime():
n = 266
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 266 простым.
### Response:
def is_prime():
n = 266
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
4,163,538 | kk | Python | var_decl | beginner | Python тілінде 810724 мәнімен speed айнымалысын қалай жариялауға болады? | speed = 810724 | ### Instruction:
Python тілінде 810724 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
speed = 810724 |
93,417,443 | 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; |
1,018,164 | en | Java | var_decl | beginner | How to declare a variable y with value 919808 in Java? | int y = 919808; | ### Instruction:
How to declare a variable y with value 919808 in Java?
### Response:
int y = 919808; |
111,989 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 5811. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(5811)); | ### Instruction:
Write a function in C# that calculates the factorial of 5811.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(5811)); |
36,181,941 | ru | Unity | string_ops | intermediate | Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
20,387,146 | 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;
} |
2,137,098 | kk | C# | var_decl | beginner | C# тілінде 68543 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 68543; | ### Instruction:
C# тілінде 68543 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 68543; |
2,330,921 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 420895 в Java? | int x = 420895; | ### Instruction:
Как объявить переменную x со значением 420895 в Java?
### Response:
int x = 420895; |
21,335,284 | 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;
} |
26,250 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 4862. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4862)); | ### Instruction:
Write a function in C# that calculates the factorial of 4862.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(4862)); |
514,325 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 6437-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6437)) | ### Instruction:
Python тілінде 1-ден 6437-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6437)) |
28,748,787 | en | Python | string_ops | advanced | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
75,782,803 | en | Python | string_ops | intermediate | Write a function that converts a string to uppercase in Python. | def to_upper(s):
return s.upper() | ### Instruction:
Write a function that converts a string to uppercase in Python.
### Response:
def to_upper(s):
return s.upper() |
1,500,096 | ru | C# | var_decl | beginner | Как объявить переменную total со значением 735930 в C#? | int total = 735930; | ### Instruction:
Как объявить переменную total со значением 735930 в C#?
### Response:
int total = 735930; |
1,273,753 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 197732 в C++? | int y = 197732; | ### Instruction:
Как объявить переменную y со значением 197732 в C++?
### Response:
int y = 197732; |
1,357,203 | en | Python | var_decl | beginner | How to declare a variable index with value 650242 in Python? | index = 650242 | ### Instruction:
How to declare a variable index with value 650242 in Python?
### Response:
index = 650242 |
4,218,014 | ru | Unity | var_decl | beginner | Как объявить переменную speed со значением 879636 в Unity? | int speed = 879636; | ### Instruction:
Как объявить переменную speed со значением 879636 в Unity?
### Response:
int speed = 879636; |
85,071,776 | kk | Unity | logic_ops | intermediate | Unity тилінде 1993 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1993;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1993 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1993;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
76,601 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 8391. | 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(8391) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 8391.
### 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(8391) << std::endl; |
1,080,480 | en | C++ | var_decl | beginner | How to declare a variable y with value 641682 in C++? | int y = 641682; | ### Instruction:
How to declare a variable y with value 641682 in C++?
### Response:
int y = 641682; |
67,219,160 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
67,303,125 | 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;
} |
28,370,757 | en | Unity | array_ops | advanced | 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;
} |
4,162,063 | en | C# | var_decl | beginner | How to declare a variable data with value 668765 in C#? | int data = 668765; | ### Instruction:
How to declare a variable data with value 668765 in C#?
### Response:
int data = 668765; |
37,584,707 | kk | Unity | array_ops | intermediate | Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
2,787,568 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 514824 в Java? | int score = 514824; | ### Instruction:
Как объявить переменную score со значением 514824 в Java?
### Response:
int score = 514824; |
28,578,604 | 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);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.