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 |
|---|---|---|---|---|---|---|---|
83,919,342 | 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();
} |
26,551,831 | en | Python | logic_ops | advanced | Write logic to check if the year 2029 is a leap year in Python. | def is_leap():
year = 2029
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2029 is a leap year in Python.
### Response:
def is_leap():
year = 2029
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,600,764 | kk | Unity | var_decl | beginner | Unity тілінде 195869 мәнімен index айнымалысын қалай жариялауға болады? | int index = 195869; | ### Instruction:
Unity тілінде 195869 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 195869; |
932,655 | en | JavaScript | var_decl | beginner | How to declare a variable rate with value 955372 in JavaScript? | let rate = 955372; | ### Instruction:
How to declare a variable rate with value 955372 in JavaScript?
### Response:
let rate = 955372; |
2,203,937 | kk | Java | var_decl | beginner | Java тілінде 750096 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 750096; | ### Instruction:
Java тілінде 750096 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 750096; |
4,540,560 | kk | Unity | var_decl | beginner | Unity тілінде 19237 мәнімен result айнымалысын қалай жариялауға болады? | int result = 19237; | ### Instruction:
Unity тілінде 19237 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
int result = 19237; |
98,321,754 | en | C# | logic_ops | advanced | Write a function that determines if the number 104 is prime in C#. | public bool IsPrime() {
int n = 104;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 104 is prime in C#.
### Response:
public bool IsPrime() {
int n = 104;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
95,859,475 | en | Python | string_ops | intermediate | 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аеёиоуыэюя') |
1,079,624 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 9309-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(9309) << std::endl; | ### Instruction:
C++ тілінде 1-ден 9309-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(9309) << std::endl; |
266,602 | kk | Java | factorial | advanced | Java тілінде 6368 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6368)); | ### Instruction:
Java тілінде 6368 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(6368)); |
2,978,960 | en | Python | var_decl | beginner | How to declare a variable health with value 61382 in Python? | health = 61382 | ### Instruction:
How to declare a variable health with value 61382 in Python?
### Response:
health = 61382 |
57,433,229 | 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;
} |
971,169 | ru | C++ | var_decl | beginner | Как объявить переменную buffer со значением 735856 в C++? | int buffer = 735856; | ### Instruction:
Как объявить переменную buffer со значением 735856 в C++?
### Response:
int buffer = 735856; |
48,002,874 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на Unity функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
2,502,904 | kk | C++ | var_decl | beginner | C++ тілінде 108899 мәнімен score айнымалысын қалай жариялауға болады? | int score = 108899; | ### Instruction:
C++ тілінде 108899 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 108899; |
183,659 | kk | C++ | var_decl | beginner | C++ тілінде 498097 мәнімен data айнымалысын қалай жариялауға болады? | int data = 498097; | ### Instruction:
C++ тілінде 498097 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 498097; |
2,372,915 | kk | C++ | var_decl | beginner | C++ тілінде 644248 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 644248; | ### Instruction:
C++ тілінде 644248 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 644248; |
26,338,209 | kk | Python | logic_ops | advanced | Python тилінде 1960 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1960
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1960 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1960
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,587,783 | ru | C++ | var_decl | beginner | Как объявить переменную limit со значением 900097 в C++? | int limit = 900097; | ### Instruction:
Как объявить переменную limit со значением 900097 в C++?
### Response:
int limit = 900097; |
57,474,822 | 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;
} |
2,927,030 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 809845 в Unity? | int amount = 809845; | ### Instruction:
Как объявить переменную amount со значением 809845 в Unity?
### Response:
int amount = 809845; |
2,447,709 | ru | JavaScript | var_decl | beginner | Как объявить переменную total со значением 211072 в JavaScript? | let total = 211072; | ### Instruction:
Как объявить переменную total со значением 211072 в JavaScript?
### Response:
let total = 211072; |
35,049,994 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
2,098,000 | en | Java | var_decl | beginner | How to declare a variable timer with value 66812 in Java? | int timer = 66812; | ### Instruction:
How to declare a variable timer with value 66812 in Java?
### Response:
int timer = 66812; |
39,177,050 | ru | C# | logic_ops | advanced | Напишите на C# функцию, определяющую, является ли число 269 простым. | public bool IsPrime() {
int n = 269;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 269 простым.
### Response:
public bool IsPrime() {
int n = 269;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
67,698,648 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
10,195,637 | 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;
} |
29,542,285 | kk | C++ | array_ops | advanced | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
3,971,646 | kk | Java | var_decl | beginner | Java тілінде 554889 мәнімен total айнымалысын қалай жариялауға болады? | int total = 554889; | ### Instruction:
Java тілінде 554889 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
int total = 554889; |
520,426 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 4834. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4834)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 4834.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(4834)) |
18,987,218 | 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);
} |
35,198,829 | en | C# | string_ops | intermediate | Write a function that checks if a string is a palindrome in C#. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C#.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
10,382,252 | en | Java | string_ops | intermediate | Write a function that counts vowels in a text in Java. | 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 Java.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
1,984,613 | ru | C# | var_decl | beginner | Как объявить переменную data со значением 709445 в C#? | int data = 709445; | ### Instruction:
Как объявить переменную data со значением 709445 в C#?
### Response:
int data = 709445; |
752,917 | kk | Python | var_decl | beginner | Python тілінде 886939 мәнімен level айнымалысын қалай жариялауға болады? | level = 886939 | ### Instruction:
Python тілінде 886939 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
level = 886939 |
2,178,453 | ru | JavaScript | var_decl | beginner | Как объявить переменную amount со значением 191166 в JavaScript? | let amount = 191166; | ### Instruction:
Как объявить переменную amount со значением 191166 в JavaScript?
### Response:
let amount = 191166; |
4,467,067 | kk | C# | var_decl | beginner | C# тілінде 423453 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 423453; | ### Instruction:
C# тілінде 423453 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 423453; |
61,685,808 | kk | Unity | array_ops | advanced | Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
3,713,467 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 77737 в Unity? | int count = 77737; | ### Instruction:
Как объявить переменную count со значением 77737 в Unity?
### Response:
int count = 77737; |
1,884,002 | en | JavaScript | var_decl | beginner | How to declare a variable size with value 869982 in JavaScript? | let size = 869982; | ### Instruction:
How to declare a variable size with value 869982 in JavaScript?
### Response:
let size = 869982; |
99,642,477 | 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;
} |
18,161 | en | Unity | func_def | intermediate | Write a function update in Unity that takes x and doubles it. | int update(int x) {
return x * 2;
} | ### Instruction:
Write a function update in Unity that takes x and doubles it.
### Response:
int update(int x) {
return x * 2;
} |
70,970,930 | en | C++ | array_ops | advanced | 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;
} |
2,193,475 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 754140 in JavaScript? | let y = 754140; | ### Instruction:
How to declare a variable y with value 754140 in JavaScript?
### Response:
let y = 754140; |
90,841,078 | en | C++ | logic_ops | intermediate | Write logic to check if the year 1964 is a leap year in C++. | public bool IsLeap() {
int y = 1964;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1964 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 1964;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
39,892,712 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
51,978,822 | en | C# | string_ops | advanced | Write a function that converts a string to uppercase in C#. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C#.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
23,758,925 | en | Python | string_ops | advanced | Write a function that checks if a string is a palindrome in Python. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Write a function that checks if a string is a palindrome in Python.
### Response:
def is_palindrome(s):
return s == s[::-1] |
371,258 | ru | C++ | factorial | advanced | Напиши функцию на C++, которая вычисляет факториал числа 350. | long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(350) << std::endl; | ### Instruction:
Напиши функцию на C++, которая вычисляет факториал числа 350.
### Response:
long long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
std::cout << factorial(350) << std::endl; |
100,264 | kk | C# | factorial | advanced | C# тілінде 8198 санының факториалын есептейтін функция жаз. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8198)); | ### Instruction:
C# тілінде 8198 санының факториалын есептейтін функция жаз.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(8198)); |
11,742,615 | 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();
} |
62,491,806 | kk | C++ | logic_ops | advanced | C++ тилінде 184 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 184;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 184 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 184;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
45,354,970 | 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(); |
42,185,989 | en | C++ | logic_ops | intermediate | Write logic to check if the year 2007 is a leap year in C++. | public bool IsLeap() {
int y = 2007;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2007 is a leap year in C++.
### Response:
public bool IsLeap() {
int y = 2007;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
42,967,456 | kk | Unity | logic_ops | advanced | Unity тилінде 474 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 474;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 474 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 474;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,395,931 | kk | Java | var_decl | beginner | Java тілінде 386035 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 386035; | ### Instruction:
Java тілінде 386035 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 386035; |
4,469,203 | kk | Python | var_decl | beginner | Python тілінде 954983 мәнімен level айнымалысын қалай жариялауға болады? | level = 954983 | ### Instruction:
Python тілінде 954983 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
level = 954983 |
51,496,900 | en | JavaScript | array_ops | advanced | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
3,493,597 | kk | C# | var_decl | beginner | C# тілінде 193024 мәнімен level айнымалысын қалай жариялауға болады? | int level = 193024; | ### Instruction:
C# тілінде 193024 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 193024; |
3,907,277 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 291315 мәнімен weight айнымалысын қалай жариялауға болады? | let weight = 291315; | ### Instruction:
JavaScript тілінде 291315 мәнімен weight айнымалысын қалай жариялауға болады?
### Response:
let weight = 291315; |
2,516,657 | ru | C# | var_decl | beginner | Как объявить переменную size со значением 479217 в C#? | int size = 479217; | ### Instruction:
Как объявить переменную size со значением 479217 в C#?
### Response:
int size = 479217; |
1,974,329 | kk | C++ | var_decl | beginner | C++ тілінде 816121 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 816121; | ### Instruction:
C++ тілінде 816121 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 816121; |
62,021,507 | kk | Java | logic_ops | intermediate | Java тилінде 139 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 139;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 139 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 139;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
49,531,108 | 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;
} |
148,202 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 4456. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4456)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 4456.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4456)); |
34,211,903 | en | Java | logic_ops | intermediate | Write a function that determines if the number 87 is prime in Java. | public bool IsPrime() {
int n = 87;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 87 is prime in Java.
### Response:
public bool IsPrime() {
int n = 87;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,422,881 | ru | JavaScript | var_decl | beginner | Как объявить переменную amount со значением 467958 в JavaScript? | let amount = 467958; | ### Instruction:
Как объявить переменную amount со значением 467958 в JavaScript?
### Response:
let amount = 467958; |
12,856,588 | 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;
} |
4,755,962 | en | JavaScript | var_decl | beginner | How to declare a variable count with value 601070 in JavaScript? | let count = 601070; | ### Instruction:
How to declare a variable count with value 601070 in JavaScript?
### Response:
let count = 601070; |
40,791,406 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
2,266,722 | kk | Java | var_decl | beginner | Java тілінде 481453 мәнімен size айнымалысын қалай жариялауға болады? | int size = 481453; | ### Instruction:
Java тілінде 481453 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
int size = 481453; |
80,213,619 | 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;
} |
87,602,053 | kk | C# | logic_ops | intermediate | C# тилінде 380 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 380;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 380 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 380;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
23,578,009 | en | Java | logic_ops | advanced | Write logic to check if the year 2085 is a leap year in Java. | public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2085 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2085;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
66,518,720 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 1916 високосным. | function isLeap() {
let y = 1916;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 1916 високосным.
### Response:
function isLeap() {
let y = 1916;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
28,332,368 | kk | JavaScript | array_ops | advanced | JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | const getMax = arr => Math.max(...arr); | ### Instruction:
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
const getMax = arr => Math.max(...arr); |
57,944 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 2595. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2595)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 2595.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2595)); |
1,395,371 | ru | Unity | var_decl | beginner | Как объявить переменную score со значением 452051 в Unity? | int score = 452051; | ### Instruction:
Как объявить переменную score со значением 452051 в Unity?
### Response:
int score = 452051; |
86,662,032 | kk | Unity | logic_ops | intermediate | Unity тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Unity тилінде 2059 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2059;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
19,724,358 | kk | Python | logic_ops | advanced | 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) |
36,584,144 | en | C# | string_ops | advanced | Write a function that converts a string to uppercase in C#. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in C#.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
364,668 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 178-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(178));
} | ### Instruction:
Unity тілінде 1-ден 178-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(178));
} |
28,877,050 | kk | Java | array_ops | advanced | 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;
} |
81,336,285 | ru | Java | array_ops | advanced | Напишите на 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;
} |
4,056,021 | en | C++ | var_decl | beginner | How to declare a variable score with value 810339 in C++? | int score = 810339; | ### Instruction:
How to declare a variable score with value 810339 in C++?
### Response:
int score = 810339; |
2,533,124 | en | C++ | var_decl | beginner | How to declare a variable amount with value 947106 in C++? | int amount = 947106; | ### Instruction:
How to declare a variable amount with value 947106 in C++?
### Response:
int amount = 947106; |
2,000,175 | en | Unity | var_decl | beginner | How to declare a variable buffer with value 971226 in Unity? | int buffer = 971226; | ### Instruction:
How to declare a variable buffer with value 971226 in Unity?
### Response:
int buffer = 971226; |
3,066,597 | kk | C# | var_decl | beginner | C# тілінде 561267 мәнімен index айнымалысын қалай жариялауға болады? | int index = 561267; | ### Instruction:
C# тілінде 561267 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 561267; |
54,839,434 | en | Java | logic_ops | intermediate | Write logic to check if the year 2079 is a leap year in Java. | public bool IsLeap() {
int y = 2079;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2079 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2079;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
31,205,214 | kk | Java | array_ops | advanced | Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,844,000 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 948814 в Java? | int data = 948814; | ### Instruction:
Как объявить переменную data со значением 948814 в Java?
### Response:
int data = 948814; |
2,436,081 | ru | Python | var_decl | beginner | Как объявить переменную value со значением 446232 в Python? | value = 446232 | ### Instruction:
Как объявить переменную value со значением 446232 в Python?
### Response:
value = 446232 |
63,941,897 | en | Java | logic_ops | advanced | Write logic to check if the year 1960 is a leap year in Java. | public bool IsLeap() {
int y = 1960;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1960 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1960;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
65,229,312 | kk | C++ | array_ops | advanced | C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
3,871,530 | kk | Python | var_decl | beginner | Python тілінде 347820 мәнімен size айнымалысын қалай жариялауға болады? | size = 347820 | ### Instruction:
Python тілінде 347820 мәнімен size айнымалысын қалай жариялауға болады?
### Response:
size = 347820 |
17,166,887 | en | C# | logic_ops | advanced | Write logic to check if the year 2073 is a leap year in C#. | public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2073 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2073;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
82,755 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 920. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(920)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 920.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(920)) |
17,505,362 | kk | Python | logic_ops | intermediate | Python тилінде 186 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 186
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 186 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 186
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
15,895,954 | en | Python | array_ops | advanced | Write a function that finds the maximum number in an array in Python. | def get_max(arr):
return max(arr) | ### Instruction:
Write a function that finds the maximum number in an array in Python.
### Response:
def get_max(arr):
return max(arr) |
1,200,121 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 338788 мәнімен rate айнымалысын қалай жариялауға болады? | let rate = 338788; | ### Instruction:
JavaScript тілінде 338788 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
let rate = 338788; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.