id int64 | language string | prog_lang string | category string | difficulty string | instruction string | output string | text string |
|---|---|---|---|---|---|---|---|
2,520,342 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 122241 мәнімен total айнымалысын қалай жариялауға болады? | let total = 122241; | ### Instruction:
JavaScript тілінде 122241 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
let total = 122241; |
45,580,821 | 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;
} |
46,940,116 | ru | 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,122,972 | en | Python | var_decl | beginner | How to declare a variable amount with value 776604 in Python? | amount = 776604 | ### Instruction:
How to declare a variable amount with value 776604 in Python?
### Response:
amount = 776604 |
1,099,514 | en | C# | var_decl | beginner | How to declare a variable y with value 222942 in C#? | int y = 222942; | ### Instruction:
How to declare a variable y with value 222942 in C#?
### Response:
int y = 222942; |
39,330,920 | en | C# | logic_ops | intermediate | Write logic to check if the year 2011 is a leap year in C#. | public bool IsLeap() {
int y = 2011;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2011 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 2011;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
67,937,713 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 2023 високосным. | public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2023 високосным.
### Response:
public bool IsLeap() {
int y = 2023;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,280,441 | kk | C++ | var_decl | beginner | C++ тілінде 434478 мәнімен x айнымалысын қалай жариялауға болады? | int x = 434478; | ### Instruction:
C++ тілінде 434478 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 434478; |
1,988,416 | ru | Python | var_decl | beginner | Как объявить переменную offset со значением 737491 в Python? | offset = 737491 | ### Instruction:
Как объявить переменную offset со значением 737491 в Python?
### Response:
offset = 737491 |
61,756,121 | en | Python | array_ops | advanced | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
31,901,066 | 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,681,474 | ru | C++ | var_decl | beginner | Как объявить переменную buffer со значением 39642 в C++? | int buffer = 39642; | ### Instruction:
Как объявить переменную buffer со значением 39642 в C++?
### Response:
int buffer = 39642; |
22,490,603 | en | C++ | logic_ops | advanced | Write a function that determines if the number 93 is prime in C++. | public bool IsPrime() {
int n = 93;
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 93 is prime in C++.
### Response:
public bool IsPrime() {
int n = 93;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,878,304 | kk | 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;
} |
61,662,619 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
1,954,220 | ru | JavaScript | var_decl | beginner | Как объявить переменную level со значением 126555 в JavaScript? | let level = 126555; | ### Instruction:
Как объявить переменную level со значением 126555 в JavaScript?
### Response:
let level = 126555; |
84,454,335 | 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;
} |
95,825,600 | 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();
} |
28,187,025 | en | Unity | logic_ops | advanced | Write a function that determines if the number 73 is prime in Unity. | public bool IsPrime() {
int n = 73;
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 73 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 73;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
34,166,991 | 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;
} |
41,815,890 | ru | JavaScript | array_ops | intermediate | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
71,790,553 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
24,899,896 | 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;
} |
39,031,574 | kk | C# | logic_ops | advanced | C# тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1946 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1946;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,851,929 | ru | Unity | var_decl | beginner | Как объявить переменную offset со значением 360054 в Unity? | int offset = 360054; | ### Instruction:
Как объявить переменную offset со значением 360054 в Unity?
### Response:
int offset = 360054; |
70,658,585 | en | Unity | array_ops | intermediate | 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;
} |
90,441,758 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая переводит строку в верхний регистр. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
### Response:
const toUpper = s => s.toUpperCase(); |
191,016 | kk | Unity | sum_n | intermediate | Unity тілінде 1-ден 5888-ге дейінгі сандардың қосындысын есептейтін функция жаз. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5888));
} | ### Instruction:
Unity тілінде 1-ден 5888-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(5888));
} |
21,863 | kk | JavaScript | factorial | advanced | JavaScript тілінде 1743 санының факториалын есептейтін функция жаз. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1743)); | ### Instruction:
JavaScript тілінде 1743 санының факториалын есептейтін функция жаз.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(1743)); |
1,901,293 | ru | Java | var_decl | beginner | Как объявить переменную offset со значением 236830 в Java? | int offset = 236830; | ### Instruction:
Как объявить переменную offset со значением 236830 в Java?
### Response:
int offset = 236830; |
146,279 | kk | Java | factorial | advanced | Java тілінде 4976 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4976)); | ### Instruction:
Java тілінде 4976 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4976)); |
13,145,177 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
23,292,881 | en | C++ | logic_ops | advanced | Write a function that determines if the number 86 is prime in C++. | public bool IsPrime() {
int n = 86;
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 86 is prime in C++.
### Response:
public bool IsPrime() {
int n = 86;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
56,612,913 | en | Java | array_ops | advanced | Write a function that finds the maximum number in an array in Java. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in Java.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,213,422 | ru | JavaScript | var_decl | beginner | Как объявить переменную health со значением 298259 в JavaScript? | let health = 298259; | ### Instruction:
Как объявить переменную health со значением 298259 в JavaScript?
### Response:
let health = 298259; |
11,991,449 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
3,757,422 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 456104 мәнімен offset айнымалысын қалай жариялауға болады? | let offset = 456104; | ### Instruction:
JavaScript тілінде 456104 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
let offset = 456104; |
146,571 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 4703. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4703)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 4703.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(4703)); |
2,131,183 | en | C++ | var_decl | beginner | How to declare a variable amount with value 603993 in C++? | int amount = 603993; | ### Instruction:
How to declare a variable amount with value 603993 in C++?
### Response:
int amount = 603993; |
3,364,450 | kk | C++ | var_decl | beginner | C++ тілінде 231407 мәнімен score айнымалысын қалай жариялауға болады? | int score = 231407; | ### Instruction:
C++ тілінде 231407 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 231407; |
4,844,656 | ru | C++ | var_decl | beginner | Как объявить переменную index со значением 212733 в C++? | int index = 212733; | ### Instruction:
Как объявить переменную index со значением 212733 в C++?
### Response:
int index = 212733; |
1,248,670 | en | C++ | var_decl | beginner | How to declare a variable data with value 74464 in C++? | int data = 74464; | ### Instruction:
How to declare a variable data with value 74464 in C++?
### Response:
int data = 74464; |
4,328,358 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 670512 в Java? | int size = 670512; | ### Instruction:
Как объявить переменную size со значением 670512 в Java?
### Response:
int size = 670512; |
457,058 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 734. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(734)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 734.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(734)) |
95,179,035 | en | C# | array_ops | intermediate | Write a function that finds the maximum number in an array in C#. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C#.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
328,224 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 2935. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2935));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2935.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(2935));
} |
96,452,723 | kk | Python | array_ops | advanced | Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
67,730,262 | ru | Unity | string_ops | intermediate | Напишите на 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;
} |
32,529,299 | en | Java | string_ops | intermediate | 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();
} |
66,664,169 | kk | Python | logic_ops | intermediate | Python тилінде 1940 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1940
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1940 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1940
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
2,948,477 | ru | Unity | var_decl | beginner | Как объявить переменную level со значением 195782 в Unity? | int level = 195782; | ### Instruction:
Как объявить переменную level со значением 195782 в Unity?
### Response:
int level = 195782; |
63,224,184 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
82,497,761 | en | Python | logic_ops | intermediate | Write a function that determines if the number 280 is prime in Python. | def is_prime():
n = 280
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 280 is prime in Python.
### Response:
def is_prime():
n = 280
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
63,631,660 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая проверяет, является ли строка палиндромом. | def is_palindrome(s):
return s == s[::-1] | ### Instruction:
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
### Response:
def is_palindrome(s):
return s == s[::-1] |
80,124,459 | 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] |
41,595,253 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 133 простым. | public bool IsPrime() {
int n = 133;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 133 простым.
### Response:
public bool IsPrime() {
int n = 133;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,387,014 | kk | Unity | var_decl | beginner | Unity тілінде 389427 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 389427; | ### Instruction:
Unity тілінде 389427 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 389427; |
24,236,631 | kk | Python | array_ops | intermediate | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
57,277,834 | 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);
} |
14,671,662 | en | C# | array_ops | intermediate | Write a function that finds the maximum number in an array in C#. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Write a function that finds the maximum number in an array in C#.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
30,667 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 6684. | 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(6684) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 6684.
### 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(6684) << std::endl; |
15,297,451 | 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; |
391,795 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 1954. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1954)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 1954.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(1954)); |
464,386 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 6763. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6763)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 6763.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(6763)); |
49,282,395 | kk | C# | logic_ops | intermediate | C# тилінде 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:
C# тилінде 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;
} |
53,848,846 | en | Unity | logic_ops | intermediate | Write logic to check if the year 1993 is a leap year in Unity. | public bool IsLeap() {
int y = 1993;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1993 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 1993;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,462,088 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 645045 мәнімен result айнымалысын қалай жариялауға болады? | let result = 645045; | ### Instruction:
JavaScript тілінде 645045 мәнімен result айнымалысын қалай жариялауға болады?
### Response:
let result = 645045; |
98,838,424 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 295 простым. | public bool IsPrime() {
int n = 295;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 295 простым.
### Response:
public bool IsPrime() {
int n = 295;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,800,513 | kk | Python | var_decl | beginner | Python тілінде 287160 мәнімен level айнымалысын қалай жариялауға болады? | level = 287160 | ### Instruction:
Python тілінде 287160 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
level = 287160 |
3,528,667 | en | Unity | var_decl | beginner | How to declare a variable timer with value 457830 in Unity? | int timer = 457830; | ### Instruction:
How to declare a variable timer with value 457830 in Unity?
### Response:
int timer = 457830; |
1,976,550 | en | Python | var_decl | beginner | How to declare a variable result with value 656050 in Python? | result = 656050 | ### Instruction:
How to declare a variable result with value 656050 in Python?
### Response:
result = 656050 |
95,727,604 | 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;
} |
40,013,949 | 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();
} |
13,945,997 | kk | Python | array_ops | intermediate | Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
66,111,533 | en | Java | string_ops | intermediate | 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();
} |
84,017,330 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 306 простым. | public bool IsPrime() {
int n = 306;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 306 простым.
### Response:
public bool IsPrime() {
int n = 306;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,005,215 | kk | C# | var_decl | beginner | C# тілінде 463453 мәнімен index айнымалысын қалай жариялауға болады? | int index = 463453; | ### Instruction:
C# тілінде 463453 мәнімен index айнымалысын қалай жариялауға болады?
### Response:
int index = 463453; |
84,618,193 | en | Python | logic_ops | advanced | Write a function that determines if the number 58 is prime in Python. | def is_prime():
n = 58
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 58 is prime in Python.
### Response:
def is_prime():
n = 58
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
167,432 | en | Unity | sum_n | intermediate | Write a function in Unity that sums numbers from 1 to 6009. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6009));
} | ### Instruction:
Write a function in Unity that sums numbers from 1 to 6009.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(6009));
} |
1,208,291 | kk | Java | var_decl | beginner | Java тілінде 287844 мәнімен health айнымалысын қалай жариялауға болады? | int health = 287844; | ### Instruction:
Java тілінде 287844 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 287844; |
651,278 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 9225. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9225));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 9225.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9225));
} |
90,878,817 | ru | JavaScript | string_ops | intermediate | Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
1,075,875 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 364869 мәнімен limit айнымалысын қалай жариялауға болады? | let limit = 364869; | ### Instruction:
JavaScript тілінде 364869 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
let limit = 364869; |
27,956,359 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 297 простым. | def is_prime():
n = 297
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 297 простым.
### Response:
def is_prime():
n = 297
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
157,302 | ru | Python | var_decl | beginner | Как объявить переменную data со значением 370675 в Python? | data = 370675 | ### Instruction:
Как объявить переменную data со значением 370675 в Python?
### Response:
data = 370675 |
79,466,238 | ru | 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;
} |
70,572 | ru | JavaScript | var_decl | beginner | Как объявить переменную size со значением 607447 в JavaScript? | let size = 607447; | ### Instruction:
Как объявить переменную size со значением 607447 в JavaScript?
### Response:
let size = 607447; |
20,166,089 | ru | Java | array_ops | intermediate | Напишите на Java функцию, которая фильтрует только четные числа из списка. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Напишите на Java функцию, которая фильтрует только четные числа из списка.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
39,489,418 | ru | Unity | array_ops | advanced | Напишите на Unity функцию, которая находит максимальное число в массиве. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Напишите на Unity функцию, которая находит максимальное число в массиве.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
3,138,832 | ru | Java | var_decl | beginner | Как объявить переменную value со значением 543827 в Java? | int value = 543827; | ### Instruction:
Как объявить переменную value со значением 543827 в Java?
### Response:
int value = 543827; |
54,611,718 | kk | Unity | array_ops | advanced | Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Unity тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
75,081,713 | kk | C# | string_ops | intermediate | C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
C# тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
2,839,253 | en | Java | var_decl | beginner | How to declare a variable limit with value 278258 in Java? | int limit = 278258; | ### Instruction:
How to declare a variable limit with value 278258 in Java?
### Response:
int limit = 278258; |
569,652 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 6823. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6823)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 6823.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6823)); |
71,809,265 | kk | Java | array_ops | intermediate | Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
Java тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
52,177,303 | kk | Python | logic_ops | intermediate | Python тилінде 1991 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | def is_leap():
year = 1991
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Python тилінде 1991 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
def is_leap():
year = 1991
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
41,235,003 | en | C# | logic_ops | intermediate | Write logic to check if the year 1942 is a leap year in C#. | public bool IsLeap() {
int y = 1942;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1942 is a leap year in C#.
### Response:
public bool IsLeap() {
int y = 1942;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
51,650,957 | 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] |
62,357 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 1804-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(1804) << std::endl; | ### Instruction:
C++ тілінде 1-ден 1804-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(1804) << std::endl; |
2,935,605 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 862979 in JavaScript? | let level = 862979; | ### Instruction:
How to declare a variable level with value 862979 in JavaScript?
### Response:
let level = 862979; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.