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 |
|---|---|---|---|---|---|---|---|
1,757,868 | en | Unity | var_decl | beginner | How to declare a variable speed with value 943273 in Unity? | int speed = 943273; | ### Instruction:
How to declare a variable speed with value 943273 in Unity?
### Response:
int speed = 943273; |
57,785,494 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C++ функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
51,844,132 | 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;
} |
673,512 | kk | C# | sum_n | intermediate | C# тілінде 1-ден 9743-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9743)); | ### Instruction:
C# тілінде 1-ден 9743-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(9743)); |
20,543,534 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1943 високосным. | public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1943 високосным.
### Response:
public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
40,651,863 | 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(); |
3,613,346 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 827580 в C++? | int timer = 827580; | ### Instruction:
Как объявить переменную timer со значением 827580 в C++?
### Response:
int timer = 827580; |
603,150 | kk | Unity | var_decl | beginner | Unity тілінде 256549 мәнімен timer айнымалысын қалай жариялауға болады? | int timer = 256549; | ### Instruction:
Unity тілінде 256549 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
int timer = 256549; |
43,722,929 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 366 простым. | public bool IsPrime() {
int n = 366;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 366 простым.
### Response:
public bool IsPrime() {
int n = 366;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
40,899,271 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
25,602 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 9614. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9614)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 9614.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9614)); |
91,590,667 | kk | Java | logic_ops | intermediate | Java тилінде 2042 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2042 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2042;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
3,320,566 | ru | C++ | var_decl | beginner | Как объявить переменную total со значением 325382 в C++? | int total = 325382; | ### Instruction:
Как объявить переменную total со значением 325382 в C++?
### Response:
int total = 325382; |
50,270,182 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на Java функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
20,304,161 | 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;
} |
520,376 | ru | C# | var_decl | beginner | Как объявить переменную size со значением 978271 в C#? | int size = 978271; | ### Instruction:
Как объявить переменную size со значением 978271 в C#?
### Response:
int size = 978271; |
57,681,126 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript функцию, определяющую, является ли число 333 простым. | function isPrime() {
let n = 333;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 333 простым.
### Response:
function isPrime() {
let n = 333;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
93,168 | ru | C# | factorial | advanced | Напиши функцию на C#, которая вычисляет факториал числа 7988. | static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7988)); | ### Instruction:
Напиши функцию на C#, которая вычисляет факториал числа 7988.
### Response:
static long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
Console.WriteLine(Factorial(7988)); |
23,597,301 | 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;
} |
66,263,295 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 184 простым. | function isPrime() {
let n = 184;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 184 простым.
### Response:
function isPrime() {
let n = 184;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
17,483,394 | 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;
} |
63,194,383 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 76 простым. | public bool IsPrime() {
int n = 76;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 76 простым.
### Response:
public bool IsPrime() {
int n = 76;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
24,346,345 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
8,273 | kk | C# | func_def | intermediate | C# тілінде buffer қабылдап, оны екі еселейтін calculate функциясын жаз. | static int calculate(int buffer) {
return buffer * 2;
} | ### Instruction:
C# тілінде buffer қабылдап, оны екі еселейтін calculate функциясын жаз.
### Response:
static int calculate(int buffer) {
return buffer * 2;
} |
20,222,334 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
12,115,488 | kk | C# | logic_ops | advanced | C# тилінде 492 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 492;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 492 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 492;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
36,006 | kk | Unity | factorial | advanced | Unity тілінде 3136 санының факториалын есептейтін функция жаз. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3136));
} | ### Instruction:
Unity тілінде 3136 санының факториалын есептейтін функция жаз.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(3136));
} |
28,763,543 | kk | Unity | logic_ops | advanced | Unity тилінде 172 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 172;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 172 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 172;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
94,736,830 | en | C# | array_ops | intermediate | Write a function that filters only even numbers from a list in C#. | public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} | ### Instruction:
Write a function that filters only even numbers from a list in C#.
### Response:
public System.Collections.Generic.List<int> Filter(int[] arr) {
var res = new System.Collections.Generic.List<int>();
foreach(int x in arr) if(x % 2 == 0) res.Add(x);
return res;
} |
65,576,948 | en | C# | logic_ops | advanced | Write a function that determines if the number 311 is prime in C#. | public bool IsPrime() {
int n = 311;
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 311 is prime in C#.
### Response:
public bool IsPrime() {
int n = 311;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
86,450,490 | en | Python | logic_ops | advanced | Write logic to check if the year 2081 is a leap year in Python. | def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2081 is a leap year in Python.
### Response:
def is_leap():
year = 2081
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
98,971,882 | 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;
} |
4,791,840 | ru | Java | var_decl | beginner | Как объявить переменную score со значением 443342 в Java? | int score = 443342; | ### Instruction:
Как объявить переменную score со значением 443342 в Java?
### Response:
int score = 443342; |
339,940 | kk | C# | var_decl | beginner | C# тілінде 461022 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 461022; | ### Instruction:
C# тілінде 461022 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 461022; |
77,453,751 | kk | Python | logic_ops | advanced | Python тилінде 301 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 301
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 301 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 301
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
27,642,270 | kk | Java | string_ops | advanced | Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
59,371,962 | 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;
} |
40,753,926 | ru | 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);
} |
56,927,492 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C++ функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
2,981,617 | ru | Python | var_decl | beginner | Как объявить переменную buffer со значением 413876 в Python? | buffer = 413876 | ### Instruction:
Как объявить переменную buffer со значением 413876 в Python?
### Response:
buffer = 413876 |
1,472,288 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 973240 в Unity? | int amount = 973240; | ### Instruction:
Как объявить переменную amount со значением 973240 в Unity?
### Response:
int amount = 973240; |
3,228,483 | ru | JavaScript | var_decl | beginner | Как объявить переменную index со значением 770751 в JavaScript? | let index = 770751; | ### Instruction:
Как объявить переменную index со значением 770751 в JavaScript?
### Response:
let index = 770751; |
70,752,373 | kk | Unity | logic_ops | advanced | Unity тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 30;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Unity тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 30;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
91,351,615 | ru | Python | string_ops | intermediate | Напишите на Python функцию, которая считает количество гласных букв в тексте. | def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') | ### Instruction:
Напишите на Python функцию, которая считает количество гласных букв в тексте.
### Response:
def count_vowels(s):
return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя') |
33,622,040 | kk | C# | logic_ops | advanced | C# тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 97;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 97 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 97;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,725,144 | ru | Unity | var_decl | beginner | Как объявить переменную amount со значением 922544 в Unity? | int amount = 922544; | ### Instruction:
Как объявить переменную amount со значением 922544 в Unity?
### Response:
int amount = 922544; |
47,506,859 | en | Python | array_ops | intermediate | Write a function that filters only even numbers from a list in Python. | def filter_even(arr):
return [x for x in arr if x % 2 == 0] | ### Instruction:
Write a function that filters only even numbers from a list in Python.
### Response:
def filter_even(arr):
return [x for x in arr if x % 2 == 0] |
59,205,918 | kk | 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;
} |
86,854,820 | kk | Python | string_ops | intermediate | Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | def to_upper(s):
return s.upper() | ### Instruction:
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
def to_upper(s):
return s.upper() |
1,703,339 | en | Unity | var_decl | beginner | How to declare a variable timer with value 88141 in Unity? | int timer = 88141; | ### Instruction:
How to declare a variable timer with value 88141 in Unity?
### Response:
int timer = 88141; |
54,262,997 | 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;
} |
2,062,443 | ru | Python | var_decl | beginner | Как объявить переменную amount со значением 702934 в Python? | amount = 702934 | ### Instruction:
Как объявить переменную amount со значением 702934 в Python?
### Response:
amount = 702934 |
171,659 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 3124. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3124)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 3124.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3124)) |
1,744,505 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 185466 в Java? | int size = 185466; | ### Instruction:
Как объявить переменную size со значением 185466 в Java?
### Response:
int size = 185466; |
1,827,953 | en | Python | var_decl | beginner | How to declare a variable size with value 871993 in Python? | size = 871993 | ### Instruction:
How to declare a variable size with value 871993 in Python?
### Response:
size = 871993 |
1,023,336 | ru | Java | var_decl | beginner | Как объявить переменную amount со значением 745355 в Java? | int amount = 745355; | ### Instruction:
Как объявить переменную amount со значением 745355 в Java?
### Response:
int amount = 745355; |
307,188 | ru | Unity | factorial | advanced | Напиши функцию на Unity, которая вычисляет факториал числа 1049. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(1049));
} | ### Instruction:
Напиши функцию на Unity, которая вычисляет факториал числа 1049.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(1049));
} |
266,056 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 4667. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4667));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 4667.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(4667));
} |
2,087,111 | ru | C++ | var_decl | beginner | Как объявить переменную index со значением 902396 в C++? | int index = 902396; | ### Instruction:
Как объявить переменную index со значением 902396 в C++?
### Response:
int index = 902396; |
91,501,000 | kk | Python | logic_ops | advanced | Python тилінде 89 санының жай сан екенін анықтайтын функцияны жазыңыз. | def is_prime():
n = 89
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Python тилінде 89 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
def is_prime():
n = 89
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
35,330,774 | kk | C# | logic_ops | advanced | C# тилінде 484 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 484;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 484 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 484;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
54,927,516 | en | Python | logic_ops | advanced | Write logic to check if the year 2078 is a leap year in Python. | def is_leap():
year = 2078
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2078 is a leap year in Python.
### Response:
def is_leap():
year = 2078
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
1,255,337 | en | Unity | var_decl | beginner | How to declare a variable result with value 420011 in Unity? | int result = 420011; | ### Instruction:
How to declare a variable result with value 420011 in Unity?
### Response:
int result = 420011; |
1,268,093 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 934887 в Java? | int weight = 934887; | ### Instruction:
Как объявить переменную weight со значением 934887 в Java?
### Response:
int weight = 934887; |
1,798,365 | ru | Java | var_decl | beginner | Как объявить переменную x со значением 520636 в Java? | int x = 520636; | ### Instruction:
Как объявить переменную x со значением 520636 в Java?
### Response:
int x = 520636; |
21,509,613 | ru | C++ | string_ops | advanced | Напишите на C++ функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C++ функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
79,594,183 | en | JavaScript | string_ops | intermediate | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
1,700,482 | en | Unity | var_decl | beginner | How to declare a variable weight with value 188145 in Unity? | int weight = 188145; | ### Instruction:
How to declare a variable weight with value 188145 in Unity?
### Response:
int weight = 188145; |
98,568,759 | en | C# | string_ops | intermediate | Write a function that counts vowels in a text in C#. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C#.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,452,435 | ru | Python | var_decl | beginner | Как объявить переменную score со значением 389659 в Python? | score = 389659 | ### Instruction:
Как объявить переменную score со значением 389659 в Python?
### Response:
score = 389659 |
4,437,089 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 748663 в Unity? | int x = 748663; | ### Instruction:
Как объявить переменную x со значением 748663 в Unity?
### Response:
int x = 748663; |
3,533,210 | en | JavaScript | var_decl | beginner | How to declare a variable level with value 437958 in JavaScript? | let level = 437958; | ### Instruction:
How to declare a variable level with value 437958 in JavaScript?
### Response:
let level = 437958; |
15,822,067 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 396 санының жай сан екенін анықтайтын функцияны жазыңыз. | function isPrime() {
let n = 396;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
JavaScript тилінде 396 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
function isPrime() {
let n = 396;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
3,746,261 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 238116 в C++? | int value = 238116; | ### Instruction:
Как объявить переменную value со значением 238116 в C++?
### Response:
int value = 238116; |
2,634,038 | ru | JavaScript | var_decl | beginner | Как объявить переменную weight со значением 659986 в JavaScript? | let weight = 659986; | ### Instruction:
Как объявить переменную weight со значением 659986 в JavaScript?
### Response:
let weight = 659986; |
394,325 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 457. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(457)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 457.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(457)); |
2,532,766 | en | JavaScript | var_decl | beginner | How to declare a variable offset with value 861075 in JavaScript? | let offset = 861075; | ### Instruction:
How to declare a variable offset with value 861075 in JavaScript?
### Response:
let offset = 861075; |
1,086,816 | kk | Java | var_decl | beginner | Java тілінде 759389 мәнімен score айнымалысын қалай жариялауға болады? | int score = 759389; | ### Instruction:
Java тілінде 759389 мәнімен score айнымалысын қалай жариялауға болады?
### Response:
int score = 759389; |
482,051 | ru | Unity | sum_n | intermediate | Напиши функцию на Unity, которая считает сумму чисел от 1 до 9934. | int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9934));
} | ### Instruction:
Напиши функцию на Unity, которая считает сумму чисел от 1 до 9934.
### Response:
int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
void Start() {
Debug.Log(SumToN(9934));
} |
91,020,028 | ru | JavaScript | array_ops | advanced | Напишите на JavaScript функцию, которая находит максимальное число в массиве. | const getMax = arr => Math.max(...arr); | ### Instruction:
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
### Response:
const getMax = arr => Math.max(...arr); |
583,416 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 7756. | 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(7756) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 7756.
### 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(7756) << std::endl; |
2,924,045 | ru | C++ | var_decl | beginner | Как объявить переменную score со значением 317235 в C++? | int score = 317235; | ### Instruction:
Как объявить переменную score со значением 317235 в C++?
### Response:
int score = 317235; |
306,802 | ru | Java | factorial | advanced | Напиши функцию на Java, которая вычисляет факториал числа 3600. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3600)); | ### Instruction:
Напиши функцию на Java, которая вычисляет факториал числа 3600.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(3600)); |
46,298,697 | kk | C++ | logic_ops | intermediate | C++ тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C++ тилінде 2043 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2043;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
304,969 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 151605 в C++? | int amount = 151605; | ### Instruction:
Как объявить переменную amount со значением 151605 в C++?
### Response:
int amount = 151605; |
53,028,867 | kk | JavaScript | string_ops | advanced | JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
2,137,057 | ru | Unity | var_decl | beginner | Как объявить переменную x со значением 771382 в Unity? | int x = 771382; | ### Instruction:
Как объявить переменную x со значением 771382 в Unity?
### Response:
int x = 771382; |
38,691,024 | 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);
} |
58,632,815 | kk | 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;
} |
65,953,580 | 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;
} |
39,414,276 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 178 is prime in C++. | public bool IsPrime() {
int n = 178;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Write a function that determines if the number 178 is prime in C++.
### Response:
public bool IsPrime() {
int n = 178;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,829,811 | ru | C# | var_decl | beginner | Как объявить переменную total со значением 371838 в C#? | int total = 371838; | ### Instruction:
Как объявить переменную total со значением 371838 в C#?
### Response:
int total = 371838; |
94,165,181 | ru | Python | logic_ops | advanced | Напишите на Python функцию, определяющую, является ли число 324 простым. | def is_prime():
n = 324
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 324 простым.
### Response:
def is_prime():
n = 324
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
13,559,134 | en | Java | string_ops | advanced | 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;
} |
61,903,816 | ru | C# | string_ops | advanced | Напишите на C# функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на C# функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
69,420,272 | en | JavaScript | string_ops | intermediate | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
4,616,525 | en | C++ | var_decl | beginner | How to declare a variable value with value 570231 in C++? | int value = 570231; | ### Instruction:
How to declare a variable value with value 570231 in C++?
### Response:
int value = 570231; |
2,362,730 | en | Python | var_decl | beginner | How to declare a variable count with value 985792 in Python? | count = 985792 | ### Instruction:
How to declare a variable count with value 985792 in Python?
### Response:
count = 985792 |
26,104,892 | ru | C# | string_ops | intermediate | Напишите на C# функцию, которая проверяет, является ли строка палиндромом. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
4,924,149 | kk | Java | var_decl | beginner | Java тілінде 692365 мәнімен x айнымалысын қалай жариялауға болады? | int x = 692365; | ### Instruction:
Java тілінде 692365 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 692365; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.