id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
1,323,518
ru
Java
var_decl
beginner
Как объявить переменную count со значением 58919 в Java?
int count = 58919;
### Instruction: Как объявить переменную count со значением 58919 в Java? ### Response: int count = 58919;
90,747,676
en
C++
array_ops
advanced
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; }
531,089
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 2354.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2354));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 2354. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(2354));
35,421,058
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]
982,072
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 8217.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8217))
### Instruction: Write a function in Python that calculates the factorial of 8217. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8217))
43,377,155
en
Unity
logic_ops
advanced
Write a function that determines if the number 191 is prime in Unity.
public bool IsPrime() { int n = 191; 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 191 is prime in Unity. ### Response: public bool IsPrime() { int n = 191; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
156,827
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 5019.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5019));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 5019. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5019));
47,463,097
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 318 простым.
def is_prime(): n = 318 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 318 простым. ### Response: def is_prime(): n = 318 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
313,220
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 8350.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8350)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 8350. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8350)); }
79,036,941
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]
59,151,358
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2053 високосным.
def is_leap(): year = 2053 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2053 високосным. ### Response: def is_leap(): year = 2053 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,703,450
kk
C#
var_decl
beginner
C# тілінде 208691 мәнімен x айнымалысын қалай жариялауға болады?
int x = 208691;
### Instruction: C# тілінде 208691 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 208691;
46,552,284
en
Python
array_ops
intermediate
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]
2,865,167
en
JavaScript
var_decl
beginner
How to declare a variable speed with value 168086 in JavaScript?
let speed = 168086;
### Instruction: How to declare a variable speed with value 168086 in JavaScript? ### Response: let speed = 168086;
414,534
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 2055-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2055)); }
### Instruction: Unity тілінде 1-ден 2055-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2055)); }
57,902,036
kk
C#
array_ops
advanced
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
12,051,608
kk
Unity
logic_ops
advanced
Unity тилінде 187 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 187; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 187 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 187; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
88,564,574
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,554,198
kk
C++
var_decl
beginner
C++ тілінде 462365 мәнімен score айнымалысын қалай жариялауға болады?
int score = 462365;
### Instruction: C++ тілінде 462365 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 462365;
90,897,714
en
Java
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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; }
63,458,774
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 135 простым.
def is_prime(): n = 135 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 135 простым. ### Response: def is_prime(): n = 135 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
1,187,375
ru
C++
var_decl
beginner
Как объявить переменную x со значением 222191 в C++?
int x = 222191;
### Instruction: Как объявить переменную x со значением 222191 в C++? ### Response: int x = 222191;
73,740,242
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; }
1,120,723
kk
C++
var_decl
beginner
C++ тілінде 858036 мәнімен score айнымалысын қалай жариялауға болады?
int score = 858036;
### Instruction: C++ тілінде 858036 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 858036;
90,928,766
en
Java
logic_ops
intermediate
Write a function that determines if the number 81 is prime in Java.
public bool IsPrime() { int n = 81; 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 81 is prime in Java. ### Response: public bool IsPrime() { int n = 81; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
44,588,092
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; }
93,325,242
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; }
97,076,107
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 42 простым.
def is_prime(): n = 42 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 42 простым. ### Response: def is_prime(): n = 42 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
2,836,486
ru
Java
var_decl
beginner
Как объявить переменную amount со значением 43462 в Java?
int amount = 43462;
### Instruction: Как объявить переменную amount со значением 43462 в Java? ### Response: int amount = 43462;
67,170,037
kk
Unity
logic_ops
intermediate
Unity тилінде 1900 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1900; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1900 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1900; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
90,584,206
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
1,633,165
ru
JavaScript
var_decl
beginner
Как объявить переменную index со значением 185555 в JavaScript?
let index = 185555;
### Instruction: Как объявить переменную index со значением 185555 в JavaScript? ### Response: let index = 185555;
2,078,122
kk
Unity
var_decl
beginner
Unity тілінде 834500 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 834500;
### Instruction: Unity тілінде 834500 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 834500;
92,305,235
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; }
30,033,542
kk
Unity
array_ops
intermediate
Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Unity тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
260,172
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 4864.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4864));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 4864. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4864));
33,778
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 7349.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7349)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 7349. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(7349)); }
2,010,150
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 644272 в Java?
int rate = 644272;
### Instruction: Как объявить переменную rate со значением 644272 в Java? ### Response: int rate = 644272;
15,153,770
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(); }
75,629,351
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 2054 високосным.
function isLeap() { let y = 2054; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 2054 високосным. ### Response: function isLeap() { let y = 2054; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
65,372,726
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 298 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 298; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 298 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 298; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
20,717,116
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
3,592,725
en
C#
var_decl
beginner
How to declare a variable result with value 485494 in C#?
int result = 485494;
### Instruction: How to declare a variable result with value 485494 in C#? ### Response: int result = 485494;
1,094,306
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 168424 в Unity?
int size = 168424;
### Instruction: Как объявить переменную size со значением 168424 в Unity? ### Response: int size = 168424;
67,580,306
en
C#
string_ops
advanced
Write a function that checks if a string is a palindrome in C#.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C#. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
2,247,255
en
Java
var_decl
beginner
How to declare a variable offset with value 494739 in Java?
int offset = 494739;
### Instruction: How to declare a variable offset with value 494739 in Java? ### Response: int offset = 494739;
32,837,821
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 2004 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 2004; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
30,763,202
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; }
94,748,387
en
Unity
array_ops
intermediate
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
43,345,034
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,366,346
kk
Java
var_decl
beginner
Java тілінде 885290 мәнімен total айнымалысын қалай жариялауға болады?
int total = 885290;
### Instruction: Java тілінде 885290 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 885290;
317,201
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 6023.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6023))
### Instruction: Write a function in Python that calculates the factorial of 6023. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(6023))
920,435
en
C++
var_decl
beginner
How to declare a variable offset with value 132070 in C++?
int offset = 132070;
### Instruction: How to declare a variable offset with value 132070 in C++? ### Response: int offset = 132070;
83,563,350
en
Java
logic_ops
intermediate
Write logic to check if the year 2095 is a leap year in Java.
public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2095 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
50,009,665
kk
C#
string_ops
intermediate
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
43,802,429
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(); }
2,488,406
kk
Unity
var_decl
beginner
Unity тілінде 93896 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 93896;
### Instruction: Unity тілінде 93896 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 93896;
76,348,631
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
24,550,751
kk
C#
array_ops
intermediate
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
70,888,911
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,357,384
en
Java
var_decl
beginner
How to declare a variable total with value 277958 in Java?
int total = 277958;
### Instruction: How to declare a variable total with value 277958 in Java? ### Response: int total = 277958;
51,754,547
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; }
2,796,541
en
Java
var_decl
beginner
How to declare a variable index with value 209024 in Java?
int index = 209024;
### Instruction: How to declare a variable index with value 209024 in Java? ### Response: int index = 209024;
1,506,140
en
C++
var_decl
beginner
How to declare a variable size with value 736103 in C++?
int size = 736103;
### Instruction: How to declare a variable size with value 736103 in C++? ### Response: int size = 736103;
676,678
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 485.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(485))
### Instruction: Write a function in Python that sums numbers from 1 to 485. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(485))
3,090,190
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 535546 в JavaScript?
let weight = 535546;
### Instruction: Как объявить переменную weight со значением 535546 в JavaScript? ### Response: let weight = 535546;
51,673,131
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 421 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 421; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 421 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 421; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
88,536,561
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 371 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 371; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 371 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 371; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,860,900
en
Unity
var_decl
beginner
How to declare a variable speed with value 492216 in Unity?
int speed = 492216;
### Instruction: How to declare a variable speed with value 492216 in Unity? ### Response: int speed = 492216;
65,953,112
en
Python
string_ops
advanced
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
153,719
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5411.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5411));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5411. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5411));
18,196,347
en
JavaScript
array_ops
advanced
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
32,079,571
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; }
1,216,242
kk
Java
var_decl
beginner
Java тілінде 428957 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 428957;
### Instruction: Java тілінде 428957 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 428957;
67,439,839
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2034 високосным.
public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2034 високосным. ### Response: public bool IsLeap() { int y = 2034; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
66,259,294
kk
Unity
logic_ops
intermediate
Unity тилінде 497 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 497; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 497 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 497; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
77,983,538
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
29,687,892
en
Java
logic_ops
advanced
Write logic to check if the year 2052 is a leap year in Java.
public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2052 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2052; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
59,565,598
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; }
46,937,905
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
1,793,228
en
Unity
var_decl
beginner
How to declare a variable offset with value 351606 in Unity?
int offset = 351606;
### Instruction: How to declare a variable offset with value 351606 in Unity? ### Response: int offset = 351606;
84,677,936
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; }
12,412,314
kk
Unity
string_ops
advanced
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,694,266
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 328313 в C++?
int buffer = 328313;
### Instruction: Как объявить переменную buffer со значением 328313 в C++? ### Response: int buffer = 328313;
2,890,378
en
Java
var_decl
beginner
How to declare a variable y with value 963679 in Java?
int y = 963679;
### Instruction: How to declare a variable y with value 963679 in Java? ### Response: int y = 963679;
12,191,958
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;
1,322,945
ru
C++
var_decl
beginner
Как объявить переменную count со значением 541621 в C++?
int count = 541621;
### Instruction: Как объявить переменную count со значением 541621 в C++? ### Response: int count = 541621;
295,085
en
C#
var_decl
beginner
How to declare a variable count with value 796013 in C#?
int count = 796013;
### Instruction: How to declare a variable count with value 796013 in C#? ### Response: int count = 796013;
980,343
ru
C++
var_decl
beginner
Как объявить переменную rate со значением 63569 в C++?
int rate = 63569;
### Instruction: Как объявить переменную rate со значением 63569 в C++? ### Response: int rate = 63569;
14,950,143
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
88,530,481
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
16,007,746
en
C#
logic_ops
advanced
Write a function that determines if the number 176 is prime in C#.
public bool IsPrime() { int n = 176; 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 176 is prime in C#. ### Response: public bool IsPrime() { int n = 176; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,363,675
en
Python
var_decl
beginner
How to declare a variable amount with value 339081 in Python?
amount = 339081
### Instruction: How to declare a variable amount with value 339081 in Python? ### Response: amount = 339081
1,185,174
en
Python
var_decl
beginner
How to declare a variable score with value 397994 in Python?
score = 397994
### Instruction: How to declare a variable score with value 397994 in Python? ### Response: score = 397994
29,131,933
ru
Unity
string_ops
intermediate
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
567,466
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 6145.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6145));
### Instruction: Write a function in C# that calculates the factorial of 6145. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(6145));
73,376,634
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; }
3,770,521
ru
Java
var_decl
beginner
Как объявить переменную score со значением 167728 в Java?
int score = 167728;
### Instruction: Как объявить переменную score со значением 167728 в Java? ### Response: int score = 167728;
2,946,944
kk
Unity
var_decl
beginner
Unity тілінде 415433 мәнімен value айнымалысын қалай жариялауға болады?
int value = 415433;
### Instruction: Unity тілінде 415433 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 415433;
4,201,666
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 112879 in JavaScript?
let offset = 112879;
### Instruction: How to declare a variable offset with value 112879 in JavaScript? ### Response: let offset = 112879;