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 |
|---|---|---|---|---|---|---|---|
76,189,693 | 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();
} |
59,203,505 | kk | Java | array_ops | intermediate | Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
67,122,149 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 438 простым. | public bool IsPrime() {
int n = 438;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 438 простым.
### Response:
public bool IsPrime() {
int n = 438;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
38,538,095 | 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;
} |
98,343,127 | kk | 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);
} |
175,656 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 6679. | 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(6679) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 6679.
### 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(6679) << std::endl; |
62,441,538 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2068;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2068 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2068;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
407,185 | kk | Python | sum_n | intermediate | Python тілінде 1-ден 7706-ге дейінгі сандардың қосындысын есептейтін функция жаз. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7706)) | ### Instruction:
Python тілінде 1-ден 7706-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(7706)) |
83,818,241 | 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);
} |
612,182 | en | C# | factorial | advanced | Write a function in C# that calculates the factorial of 3671. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3671)); | ### Instruction:
Write a function in C# that calculates the factorial of 3671.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(3671)); |
92,343,514 | kk | Unity | logic_ops | advanced | Unity тилінде 126 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 126;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 126 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 126;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
84,466,876 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1917 is a leap year in C++. | public bool IsLeap() {
int y = 1917;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1917 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1917;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
29,501,012 | 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;
} |
29,415,871 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
85,344,722 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 178 простым. | public bool IsPrime() {
int n = 178;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 178 простым.
### Response:
public bool IsPrime() {
int n = 178;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
669,192 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 208. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(208)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 208.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(208)) |
380,038 | en | JavaScript | var_decl | beginner | How to declare a variable score with value 190534 in JavaScript? | let score = 190534; | ### Instruction:
How to declare a variable score with value 190534 in JavaScript?
### Response:
let score = 190534; |
53,964,240 | kk | Unity | logic_ops | intermediate | Unity тилінде 2000 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2000;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2000 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2000;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
88,852,880 | 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();
} |
45,588 | ru | Java | sum_n | intermediate | Напиши функцию на Java, которая считает сумму чисел от 1 до 1387. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1387)); | ### Instruction:
Напиши функцию на Java, которая считает сумму чисел от 1 до 1387.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(1387)); |
37,127,472 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
91,479,121 | 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;
} |
1,239,704 | ru | Unity | var_decl | beginner | Как объявить переменную result со значением 459719 в Unity? | int result = 459719; | ### Instruction:
Как объявить переменную result со значением 459719 в Unity?
### Response:
int result = 459719; |
1,868,494 | en | C# | var_decl | beginner | How to declare a variable rate with value 865765 in C#? | int rate = 865765; | ### Instruction:
How to declare a variable rate with value 865765 in C#?
### Response:
int rate = 865765; |
31,970,493 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
72,737,762 | en | JavaScript | string_ops | intermediate | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
4,334,688 | kk | Java | var_decl | beginner | Java тілінде 18304 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 18304; | ### Instruction:
Java тілінде 18304 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 18304; |
68,041,855 | 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); |
34,468,185 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
2,650,567 | ru | C# | var_decl | beginner | Как объявить переменную result со значением 897577 в C#? | int result = 897577; | ### Instruction:
Как объявить переменную result со значением 897577 в C#?
### Response:
int result = 897577; |
43,599,684 | kk | Python | logic_ops | advanced | Python тилінде 1973 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1973
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1973 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1973
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
96,151,669 | kk | Unity | array_ops | intermediate | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
19,766,915 | 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;
} |
3,611,719 | en | C++ | var_decl | beginner | How to declare a variable total with value 291763 in C++? | int total = 291763; | ### Instruction:
How to declare a variable total with value 291763 in C++?
### Response:
int total = 291763; |
3,136,528 | kk | C++ | var_decl | beginner | C++ тілінде 400511 мәнімен score айнымалысын қалай жариялауға болады? | int score = 400511; | ### Instruction:
C++ тілінде 400511 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 400511; |
4,291,321 | ru | JavaScript | var_decl | beginner | Как объявить переменную result со значением 193775 в JavaScript? | let result = 193775; | ### Instruction:
Как объявить переменную result со значением 193775 в JavaScript?
### Response:
let result = 193775; |
757,577 | kk | Java | var_decl | beginner | Java тілінде 709979 мәнімен score айнымалысын қалай жариялауға болады? | int score = 709979; | ### Instruction:
Java тілінде 709979 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 709979; |
67,564,699 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1908 високосным. | public bool IsLeap() {
int y = 1908;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1908 високосным.
### Response:
public bool IsLeap() {
int y = 1908;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
84,994,606 | 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,731,491 | en | Unity | string_ops | advanced | 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();
} |
1,373,728 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 15985 в C++? | int total = 15985; | ### Instruction:
Как объявить переменную total со значением 15985 в C++?
### Response:
int total = 15985; |
1,245,771 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 4777. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4777));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 4777.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(4777));
} |
4,984,316 | ru | JavaScript | var_decl | beginner | Как объявить переменную speed со значением 789821 в JavaScript? | let speed = 789821; | ### Instruction:
Как объявить переменную speed со значением 789821 в JavaScript?
### Response:
let speed = 789821; |
34,978,116 | 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;
} |
352,310 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 9781. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9781));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 9781.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9781));
} |
1,926,259 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 64361 в JavaScript? | let weight = 64361; | ### Instruction:
Как объявить переменную weight со значением 64361 в JavaScript?
### Response:
let weight = 64361; |
940,886 | en | JavaScript | var_decl | beginner | How to declare a variable value with value 859120 in JavaScript? | let value = 859120; | ### Instruction:
How to declare a variable value with value 859120 in JavaScript?
### Response:
let value = 859120; |
35,335 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 7492. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7492)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 7492.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7492)) |
24,072,247 | en | JavaScript | string_ops | advanced | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
627,896 | kk | Python | factorial | advanced | Python тілінде 1770 санының факториалын есептейтін функция жаз. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1770)) | ### Instruction:
Python тілінде 1770 санының факториалын есептейтін функция жаз.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(1770)) |
77,404,815 | kk | Unity | logic_ops | intermediate | Unity тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 166;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 166;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
74,625,064 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
32,321,536 | kk | C# | array_ops | intermediate | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
4,381,342 | ru | Java | var_decl | beginner | Как объявить переменную amount со значением 357554 в Java? | int amount = 357554; | ### Instruction:
Как объявить переменную amount со значением 357554 в Java?
### Response:
int amount = 357554; |
11,620,858 | ru | Java | logic_ops | advanced | Напишите на Java логику проверки, является ли год 2084 високосным. | public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 2084 високосным.
### Response:
public bool IsLeap() {
int y = 2084;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
51,931,462 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
663,981 | ru | C++ | var_decl | beginner | Как объявить переменную rate со значением 326364 в C++? | int rate = 326364; | ### Instruction:
Как объявить переменную rate со значением 326364 в C++?
### Response:
int rate = 326364; |
16,560,570 | 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;
} |
4,872,508 | ru | Python | var_decl | beginner | Как объявить переменную total со значением 12628 в Python? | total = 12628 | ### Instruction:
Как объявить переменную total со значением 12628 в Python?
### Response:
total = 12628 |
2,489,322 | en | Unity | var_decl | beginner | How to declare a variable timer with value 855340 in Unity? | int timer = 855340; | ### Instruction:
How to declare a variable timer with value 855340 in Unity?
### Response:
int timer = 855340; |
413,402 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 8565-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8565)); | ### Instruction:
C# тілінде 1-ден 8565-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(8565)); |
3,186,852 | ru | C# | var_decl | beginner | Как объявить переменную health со значением 996133 в C#? | int health = 996133; | ### Instruction:
Как объявить переменную health со значением 996133 в C#?
### Response:
int health = 996133; |
99,334,395 | kk | Python | logic_ops | intermediate | Python тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1914
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1914 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1914
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,958,332 | en | JavaScript | var_decl | beginner | How to declare a variable rate with value 767754 in JavaScript? | let rate = 767754; | ### Instruction:
How to declare a variable rate with value 767754 in JavaScript?
### Response:
let rate = 767754; |
1,063,196 | ru | Python | var_decl | beginner | Как объявить переменную y со значением 988792 в Python? | y = 988792 | ### Instruction:
Как объявить переменную y со значением 988792 в Python?
### Response:
y = 988792 |
79,098,004 | en | Java | logic_ops | intermediate | Write logic to check if the year 2059 is a leap year in Java. | public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2059 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,554,662 | en | C++ | var_decl | beginner | How to declare a variable value with value 613650 in C++? | int value = 613650; | ### Instruction:
How to declare a variable value with value 613650 in C++?
### Response:
int value = 613650; |
4,153,852 | kk | C# | var_decl | beginner | C# тілінде 844537 мәнімен total айнымалысын қалай жариялауға болады? | int total = 844537; | ### Instruction:
C# тілінде 844537 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 844537; |
1,782,416 | ru | JavaScript | var_decl | beginner | Как объявить переменную timer со значением 755971 в JavaScript? | let timer = 755971; | ### Instruction:
Как объявить переменную timer со значением 755971 в JavaScript?
### Response:
let timer = 755971; |
2,184,577 | ru | C++ | var_decl | beginner | Как объявить переменную result со значением 693690 в C++? | int result = 693690; | ### Instruction:
Как объявить переменную result со значением 693690 в C++?
### Response:
int result = 693690; |
30,028,195 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript логику проверки, является ли год 2021 високосным. | function isLeap() {
let y = 2021;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2021 високосным.
### Response:
function isLeap() {
let y = 2021;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,737,140 | kk | Unity | var_decl | beginner | Unity тілінде 862699 мәнімен data айнымалысын қалай жариялауға болады? | int data = 862699; | ### Instruction:
Unity тілінде 862699 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 862699; |
73,449,521 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
2,700,789 | kk | Java | var_decl | beginner | Java тілінде 550300 мәнімен size айнымалысын қалай жариялауға болады? | int size = 550300; | ### Instruction:
Java тілінде 550300 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 550300; |
2,889,486 | en | C++ | var_decl | beginner | How to declare a variable amount with value 5055 in C++? | int amount = 5055; | ### Instruction:
How to declare a variable amount with value 5055 in C++?
### Response:
int amount = 5055; |
55,716,224 | 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;
} |
54,849,270 | en | JavaScript | string_ops | advanced | Write a function that checks if a string is a palindrome in JavaScript. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
Write a function that checks if a string is a palindrome in JavaScript.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
42,652,543 | ru | 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;
} |
23,337,525 | en | JavaScript | string_ops | advanced | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
13,646,963 | ru | Java | string_ops | intermediate | Напишите на 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;
} |
53,523,657 | kk | Python | logic_ops | intermediate | Python тилінде 450 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 450
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 450 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 450
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
561,496 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 891925 in JavaScript? | let level = 891925; | ### Instruction:
How to declare a variable level with value 891925 in JavaScript?
### Response:
let level = 891925; |
980,210 | en | JavaScript | var_decl | beginner | How to declare a variable buffer with value 369335 in JavaScript? | let buffer = 369335; | ### Instruction:
How to declare a variable buffer with value 369335 in JavaScript?
### Response:
let buffer = 369335; |
2,375,283 | en | JavaScript | var_decl | beginner | How to declare a variable timer with value 100516 in JavaScript? | let timer = 100516; | ### Instruction:
How to declare a variable timer with value 100516 in JavaScript?
### Response:
let timer = 100516; |
201,242 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 5327-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5327)); | ### Instruction:
JavaScript тілінде 1-ден 5327-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(5327)); |
44,732,549 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 205 простым. | public bool IsPrime() {
int n = 205;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 205 простым.
### Response:
public bool IsPrime() {
int n = 205;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,148 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 2239. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2239)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 2239.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2239)); |
252,931 | ru | Python | var_decl | beginner | Как объявить переменную timer со значением 161831 в Python? | timer = 161831 | ### Instruction:
Как объявить переменную timer со значением 161831 в Python?
### Response:
timer = 161831 |
66,688,036 | 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;
} |
47,970,018 | kk | C++ | logic_ops | advanced | C++ тилінде 112 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 112;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 112 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 112;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,974,616 | kk | Java | var_decl | beginner | Java тілінде 335912 мәнімен y айнымалысын қалай жариялауға болады? | int y = 335912; | ### Instruction:
Java тілінде 335912 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 335912; |
78,129,055 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1926 високосным. | public bool IsLeap() {
int y = 1926;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1926 високосным.
### Response:
public bool IsLeap() {
int y = 1926;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
67,592,839 | kk | Python | string_ops | advanced | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
53,672,364 | 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,325,137 | en | Python | string_ops | advanced | Write a function that counts vowels in a text in Python. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Write a function that counts vowels in a text in Python.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
287,911 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 366. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(366)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 366.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(366)); |
3,210,653 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 943107 в Java? | int health = 943107; | ### Instruction:
Как объявить переменную health со значением 943107 в Java?
### Response:
int health = 943107; |
68,016,640 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
40,093,940 | en | Unity | array_ops | advanced | Write a function that filters only even numbers from a list in Unity. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in Unity.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
367,964 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 814176 в C#? | int rate = 814176; | ### Instruction:
Как объявить переменную rate со значением 814176 в C#?
### Response:
int rate = 814176; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.