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 |
|---|---|---|---|---|---|---|---|
44,248,428 | 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;
} |
1,913,529 | en | Java | var_decl | beginner | How to declare a variable limit with value 161548 in Java? | int limit = 161548; | ### Instruction:
How to declare a variable limit with value 161548 in Java?
### Response:
int limit = 161548; |
55,010,174 | en | Java | array_ops | intermediate | 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;
} |
66,990,376 | kk | Python | logic_ops | intermediate | Python тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1986
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1986 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1986
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
55,259,826 | 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; |
683,896 | ru | JavaScript | var_decl | beginner | Как объявить переменную level со значением 987255 в JavaScript? | let level = 987255; | ### Instruction:
Как объявить переменную level со значением 987255 в JavaScript?
### Response:
let level = 987255; |
3,320,971 | en | C# | var_decl | beginner | How to declare a variable data with value 604391 in C#? | int data = 604391; | ### Instruction:
How to declare a variable data with value 604391 in C#?
### Response:
int data = 604391; |
4,312,052 | kk | Java | var_decl | beginner | Java тілінде 978754 мәнімен data айнымалысын қалай жариялауға болады? | int data = 978754; | ### Instruction:
Java тілінде 978754 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 978754; |
35,470,519 | ru | 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;
} |
48,653,918 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 313 простым. | public bool IsPrime() {
int n = 313;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 313 простым.
### Response:
public bool IsPrime() {
int n = 313;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,571,945 | kk | C# | var_decl | beginner | C# тілінде 95982 мәнімен x айнымалысын қалай жариялауға болады? | int x = 95982; | ### Instruction:
C# тілінде 95982 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 95982; |
34,492,289 | 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);
} |
98,797,027 | 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;
} |
484,648 | kk | C++ | var_decl | beginner | C++ тілінде 154141 мәнімен total айнымалысын қалай жариялауға болады? | int total = 154141; | ### Instruction:
C++ тілінде 154141 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 154141; |
33,669,995 | en | C# | logic_ops | intermediate | Write logic to check if the year 1973 is a leap year in C#. | public bool IsLeap() {
int y = 1973;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1973 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1973;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
80,981,634 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
71,672,838 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1966;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1966 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1966;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
48,336,274 | ru | JavaScript | string_ops | advanced | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
99,637,378 | kk | Unity | logic_ops | advanced | Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 1911 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1911;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
65,117,653 | 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;
} |
88,753,400 | 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();
} |
3,269,967 | kk | Unity | var_decl | beginner | Unity тілінде 12343 мәнімен weight айнымалысын қалай жариялауға болады? | int weight = 12343; | ### Instruction:
Unity тілінде 12343 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
int weight = 12343; |
3,421,541 | kk | Python | var_decl | beginner | Python тілінде 752985 мәнімен y айнымалысын қалай жариялауға болады? | y = 752985 | ### Instruction:
Python тілінде 752985 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
y = 752985 |
400,589 | kk | Python | var_decl | beginner | Python тілінде 159976 мәнімен result айнымалысын қалай жариялауға болады? | result = 159976 | ### Instruction:
Python тілінде 159976 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
result = 159976 |
90,228,429 | kk | C# | logic_ops | intermediate | C# тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2078;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2078 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2078;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
230,764 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 2467. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2467)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 2467.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2467)); |
30,596,872 | ru | 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;
} |
77,373,941 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 432 простым. | public bool IsPrime() {
int n = 432;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 432 простым.
### Response:
public bool IsPrime() {
int n = 432;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
21,541,140 | 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;
} |
1,958,582 | kk | C++ | var_decl | beginner | C++ тілінде 412184 мәнімен data айнымалысын қалай жариялауға болады? | int data = 412184; | ### Instruction:
C++ тілінде 412184 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 412184; |
4,752,167 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 285294 мәнімен level айнымалысын қалай жариялауға болады? | let level = 285294; | ### Instruction:
JavaScript тілінде 285294 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
let level = 285294; |
91,507,454 | ru | Unity | string_ops | advanced | Напишите на Unity функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на Unity функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
76,599,888 | ru | C++ | array_ops | intermediate | Напишите на C++ функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на C++ функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
89,027,852 | en | Python | logic_ops | intermediate | Write a function that determines if the number 334 is prime in Python. | def is_prime():
n = 334
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 334 is prime in Python.
### Response:
def is_prime():
n = 334
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
98,922,939 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2073;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2073;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
14,509,906 | 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;
} |
3,397,841 | ru | C# | var_decl | beginner | Как объявить переменную level со значением 681022 в C#? | int level = 681022; | ### Instruction:
Как объявить переменную level со значением 681022 в C#?
### Response:
int level = 681022; |
15,759,599 | kk | Java | logic_ops | intermediate | Java тилінде 267 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 267;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 267 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 267;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
540,773 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 5493. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5493));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 5493.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(5493));
} |
50,530,369 | kk | 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);
} |
22,647,054 | en | Java | array_ops | intermediate | Write a function that reverses a list in Java. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Write a function that reverses a list in Java.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
78,088,066 | 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;
} |
49,868,725 | 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аеёиоуыэюя') |
75,460,526 | kk | C++ | logic_ops | advanced | C++ тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2019;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2019 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2019;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
83,168,183 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Java функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
37,811,999 | 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);
} |
51,768,511 | ru | C++ | string_ops | intermediate | Напишите на C++ функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C++ функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
90,853 | kk | JavaScript | sum_n | intermediate | JavaScript тілінде 1-ден 2394-ге дейінгі сандардың қосындысын есептейтін функция жаз. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2394)); | ### Instruction:
JavaScript тілінде 1-ден 2394-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(2394)); |
861,048 | en | Python | var_decl | beginner | How to declare a variable rate with value 198035 in Python? | rate = 198035 | ### Instruction:
How to declare a variable rate with value 198035 in Python?
### Response:
rate = 198035 |
232,224 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 4306. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4306) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 4306.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(4306) << std::endl; |
23,915,865 | ru | C++ | string_ops | intermediate | Напишите на C++ функцию, которая считает количество гласных букв в тексте. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
4,723,517 | kk | Python | var_decl | beginner | Python тілінде 144964 мәнімен size айнымалысын қалай жариялауға болады? | size = 144964 | ### Instruction:
Python тілінде 144964 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
size = 144964 |
2,958,957 | en | Unity | var_decl | beginner | How to declare a variable buffer with value 548718 in Unity? | int buffer = 548718; | ### Instruction:
How to declare a variable buffer with value 548718 in Unity?
### Response:
int buffer = 548718; |
47,032,177 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
4,414,892 | ru | JavaScript | var_decl | beginner | Как объявить переменную score со значением 731722 в JavaScript? | let score = 731722; | ### Instruction:
Как объявить переменную score со значением 731722 в JavaScript?
### Response:
let score = 731722; |
84,030,618 | 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;
} |
4,911,461 | en | C# | var_decl | beginner | How to declare a variable y with value 761290 in C#? | int y = 761290; | ### Instruction:
How to declare a variable y with value 761290 in C#?
### Response:
int y = 761290; |
3,706,630 | en | Unity | var_decl | beginner | How to declare a variable speed with value 670016 in Unity? | int speed = 670016; | ### Instruction:
How to declare a variable speed with value 670016 in Unity?
### Response:
int speed = 670016; |
80,731,876 | kk | JavaScript | logic_ops | intermediate | JavaScript тилінде 1979 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 1979 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
76,362,165 | ru | C# | logic_ops | advanced | Напишите на C# логику проверки, является ли год 1981 високосным. | public bool IsLeap() {
int y = 1981;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C# логику проверки, является ли год 1981 високосным.
### Response:
public bool IsLeap() {
int y = 1981;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,647,926 | ru | C# | var_decl | beginner | Как объявить переменную level со значением 301247 в C#? | int level = 301247; | ### Instruction:
Как объявить переменную level со значением 301247 в C#?
### Response:
int level = 301247; |
66,187,420 | 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;
} |
3,433,247 | en | C++ | var_decl | beginner | How to declare a variable health with value 21460 in C++? | int health = 21460; | ### Instruction:
How to declare a variable health with value 21460 in C++?
### Response:
int health = 21460; |
22,892,420 | kk | Unity | logic_ops | advanced | Unity тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 286;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 286 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 286;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
649,947 | kk | C# | var_decl | beginner | C# тілінде 362041 мәнімен total айнымалысын қалай жариялауға болады? | int total = 362041; | ### Instruction:
C# тілінде 362041 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 362041; |
52,500,855 | 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;
} |
469,449 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 3512. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3512)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 3512.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3512)); |
3,936,999 | ru | Java | var_decl | beginner | Как объявить переменную health со значением 551439 в Java? | int health = 551439; | ### Instruction:
Как объявить переменную health со значением 551439 в Java?
### Response:
int health = 551439; |
92,151,080 | kk | 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;
} |
70,955,580 | en | Python | logic_ops | intermediate | Write logic to check if the year 2033 is a leap year in Python. | def is_leap():
year = 2033
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2033 is a leap year in Python.
### Response:
def is_leap():
year = 2033
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,942,391 | en | C++ | var_decl | beginner | How to declare a variable weight with value 550196 in C++? | int weight = 550196; | ### Instruction:
How to declare a variable weight with value 550196 in C++?
### Response:
int weight = 550196; |
3,109,363 | ru | Unity | var_decl | beginner | Как объявить переменную rate со значением 890871 в Unity? | int rate = 890871; | ### Instruction:
Как объявить переменную rate со значением 890871 в Unity?
### Response:
int rate = 890871; |
4,649,926 | en | C# | var_decl | beginner | How to declare a variable result with value 373320 in C#? | int result = 373320; | ### Instruction:
How to declare a variable result with value 373320 in C#?
### Response:
int result = 373320; |
48,390,859 | en | JavaScript | logic_ops | intermediate | Write logic to check if the year 2063 is a leap year in JavaScript. | function isLeap() {
let y = 2063;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 2063 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 2063;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
52,817,391 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 1935 високосным. | public bool IsLeap() {
int y = 1935;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1935 високосным.
### Response:
public bool IsLeap() {
int y = 1935;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
61,621,123 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
90,718,103 | ru | Python | array_ops | advanced | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
26,086,138 | en | Python | logic_ops | intermediate | Write logic to check if the year 1935 is a leap year in Python. | def is_leap():
year = 1935
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 1935 is a leap year in Python.
### Response:
def is_leap():
year = 1935
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
25,497,325 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2024 is a leap year in C++. | public bool IsLeap() {
int y = 2024;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2024 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2024;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
96,707 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 2855. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2855)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 2855.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(2855)); |
85,724,919 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2086 is a leap year in Unity. | public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2086 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2086;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
28,892,014 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
4,486,826 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 285350 в Java? | int x = 285350; | ### Instruction:
Как объявить переменную x со значением 285350 в Java?
### Response:
int x = 285350; |
59,223,483 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | const isPalindrome = s => s === s.split('').reverse().join(''); | ### Instruction:
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
const isPalindrome = s => s === s.split('').reverse().join(''); |
2,992,021 | ru | Python | var_decl | beginner | Как объявить переменную buffer со значением 823336 в Python? | buffer = 823336 | ### Instruction:
Как объявить переменную buffer со значением 823336 в Python?
### Response:
buffer = 823336 |
309,381 | en | Python | var_decl | beginner | How to declare a variable buffer with value 920186 in Python? | buffer = 920186 | ### Instruction:
How to declare a variable buffer with value 920186 in Python?
### Response:
buffer = 920186 |
53,210,488 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
3,511,681 | ru | C++ | var_decl | beginner | Как объявить переменную level со значением 837158 в C++? | int level = 837158; | ### Instruction:
Как объявить переменную level со значением 837158 в C++?
### Response:
int level = 837158; |
3,763,587 | en | JavaScript | var_decl | beginner | How to declare a variable data with value 161890 in JavaScript? | let data = 161890; | ### Instruction:
How to declare a variable data with value 161890 in JavaScript?
### Response:
let data = 161890; |
2,315,115 | en | Java | var_decl | beginner | How to declare a variable score with value 338329 in Java? | int score = 338329; | ### Instruction:
How to declare a variable score with value 338329 in Java?
### Response:
int score = 338329; |
2,299,199 | ru | C# | var_decl | beginner | Как объявить переменную level со значением 192910 в C#? | int level = 192910; | ### Instruction:
Как объявить переменную level со значением 192910 в C#?
### Response:
int level = 192910; |
751,019 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 117488 мәнімен health айнымалысын қалай жариялауға болады? | let health = 117488; | ### Instruction:
JavaScript тілінде 117488 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
let health = 117488; |
547,716 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 4719. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4719)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 4719.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(4719)); |
28,171,943 | 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;
} |
57,289,525 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 192 простым. | public bool IsPrime() {
int n = 192;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 192 простым.
### Response:
public bool IsPrime() {
int n = 192;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
41,259,754 | kk | Python | string_ops | intermediate | Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
def is_palindrome(s):
return s == s[::-1] |
93,265,214 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,504,471 | kk | C# | var_decl | beginner | C# тілінде 373286 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 373286; | ### Instruction:
C# тілінде 373286 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 373286; |
23,951,677 | kk | JavaScript | string_ops | intermediate | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
43,172,839 | ru | Unity | logic_ops | advanced | Напишите на Unity логику проверки, является ли год 2036 високосным. | public bool IsLeap() {
int y = 2036;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2036 високосным.
### Response:
public bool IsLeap() {
int y = 2036;
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.