id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
93,633,501
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
87,408,576
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2100 високосным.
public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2100 високосным. ### Response: public bool IsLeap() { int y = 2100; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,939,186
ru
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);
3,838,585
kk
JavaScript
var_decl
beginner
JavaScript тілінде 646942 мәнімен timer айнымалысын қалай жариялауға болады?
let timer = 646942;
### Instruction: JavaScript тілінде 646942 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: let timer = 646942;
210,637
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 2963.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2963));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 2963. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(2963));
93,061,047
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
477,242
ru
C++
var_decl
beginner
Как объявить переменную rate со значением 14995 в C++?
int rate = 14995;
### Instruction: Как объявить переменную rate со значением 14995 в C++? ### Response: int rate = 14995;
53,281,294
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in 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: Write a function that checks if a string is a palindrome in 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,772,454
ru
C++
string_ops
advanced
Напишите на C++ функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на C++ функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
92,736,804
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; }
195,747
en
C#
var_decl
beginner
How to declare a variable result with value 502736 in C#?
int result = 502736;
### Instruction: How to declare a variable result with value 502736 in C#? ### Response: int result = 502736;
70,174,660
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
87,206,344
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
752,521
kk
C#
var_decl
beginner
C# тілінде 198802 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 198802;
### Instruction: C# тілінде 198802 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 198802;
75,273,194
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
408,358
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 5848.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5848)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 5848. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5848)); }
268,228
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 8262.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8262));
### Instruction: Write a function in C# that calculates the factorial of 8262. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8262));
37,898,508
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
2,758,563
kk
JavaScript
var_decl
beginner
JavaScript тілінде 349782 мәнімен value айнымалысын қалай жариялауға болады?
let value = 349782;
### Instruction: JavaScript тілінде 349782 мәнімен value айнымалысын қалай жариялауға болады? ### Response: let value = 349782;
3,150,837
ru
Python
var_decl
beginner
Как объявить переменную y со значением 502934 в Python?
y = 502934
### Instruction: Как объявить переменную y со значением 502934 в Python? ### Response: y = 502934
79,715,377
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
62,761,843
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
149,090
kk
C#
var_decl
beginner
C# тілінде 314009 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 314009;
### Instruction: C# тілінде 314009 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 314009;
3,308,132
kk
Python
var_decl
beginner
Python тілінде 968886 мәнімен level айнымалысын қалай жариялауға болады?
level = 968886
### Instruction: Python тілінде 968886 мәнімен level айнымалысын қалай жариялауға болады? ### Response: level = 968886
19,978,909
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(); }
19,769,144
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; }
93,237,897
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аеёиоуыэюя')
66,004,114
en
Python
logic_ops
advanced
Write logic to check if the year 1990 is a leap year in Python.
def is_leap(): year = 1990 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1990 is a leap year in Python. ### Response: def is_leap(): year = 1990 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
14,881,963
ru
C#
string_ops
advanced
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
720,257
en
JavaScript
var_decl
beginner
How to declare a variable index with value 968593 in JavaScript?
let index = 968593;
### Instruction: How to declare a variable index with value 968593 in JavaScript? ### Response: let index = 968593;
61,289,559
kk
Python
logic_ops
intermediate
Python тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 478 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 478 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
42,022,525
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; }
57,147,491
en
Unity
string_ops
intermediate
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
14,192,960
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 74 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 74; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 74 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 74; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,033,231
en
C++
var_decl
beginner
How to declare a variable value with value 151246 in C++?
int value = 151246;
### Instruction: How to declare a variable value with value 151246 in C++? ### Response: int value = 151246;
641,692
ru
C#
var_decl
beginner
Как объявить переменную weight со значением 642008 в C#?
int weight = 642008;
### Instruction: Как объявить переменную weight со значением 642008 в C#? ### Response: int weight = 642008;
78,385,040
en
C#
logic_ops
advanced
Write a function that determines if the number 202 is prime in C#.
public bool IsPrime() { int n = 202; 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 202 is prime in C#. ### Response: public bool IsPrime() { int n = 202; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,475,662
kk
C#
var_decl
beginner
C# тілінде 632732 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 632732;
### Instruction: C# тілінде 632732 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 632732;
47,684,312
en
Java
array_ops
intermediate
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
58,176,210
en
Python
array_ops
advanced
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]
4,526,775
en
JavaScript
var_decl
beginner
How to declare a variable value with value 383014 in JavaScript?
let value = 383014;
### Instruction: How to declare a variable value with value 383014 in JavaScript? ### Response: let value = 383014;
62,589,775
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]
31,895,857
en
C#
array_ops
advanced
Write a function that filters only even numbers from a list in C#.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C#. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,253,514
kk
C++
var_decl
beginner
C++ тілінде 595163 мәнімен count айнымалысын қалай жариялауға болады?
int count = 595163;
### Instruction: C++ тілінде 595163 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 595163;
34,666,029
kk
Python
logic_ops
advanced
Python тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 30 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 30 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 30 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
12,364,777
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript логику проверки, является ли год 1932 високосным.
function isLeap() { let y = 1932; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Напишите на JavaScript логику проверки, является ли год 1932 високосным. ### Response: function isLeap() { let y = 1932; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
90,840,042
kk
Python
logic_ops
advanced
Python тилінде 327 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 327 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 327 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 327 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
29,877,607
en
JavaScript
array_ops
advanced
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();
311,347
en
Unity
var_decl
beginner
How to declare a variable value with value 303958 in Unity?
int value = 303958;
### Instruction: How to declare a variable value with value 303958 in Unity? ### Response: int value = 303958;
86,629,988
kk
Java
array_ops
intermediate
Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Java тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
69,058,635
kk
C#
logic_ops
intermediate
C# тилінде 2047 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2047 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2047; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
53,823,748
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аеёиоуыэюя')
4,334,387
kk
C#
var_decl
beginner
C# тілінде 863553 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 863553;
### Instruction: C# тілінде 863553 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 863553;
37,054,624
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
50,191,084
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
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 Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
50,973,127
ru
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); }
25,602,749
kk
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; }
1,063,896
en
Java
var_decl
beginner
How to declare a variable buffer with value 435933 in Java?
int buffer = 435933;
### Instruction: How to declare a variable buffer with value 435933 in Java? ### Response: int buffer = 435933;
79,369,935
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,118,164
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 123779 в C++?
int buffer = 123779;
### Instruction: Как объявить переменную buffer со значением 123779 в C++? ### Response: int buffer = 123779;
83,554,272
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 57 is prime in JavaScript.
function isPrime() { let n = 57; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 57 is prime in JavaScript. ### Response: function isPrime() { let n = 57; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
84,836,510
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; }
20,553,943
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,186,869
ru
Java
var_decl
beginner
Как объявить переменную data со значением 673808 в Java?
int data = 673808;
### Instruction: Как объявить переменную data со значением 673808 в Java? ### Response: int data = 673808;
582,383
kk
Java
factorial
advanced
Java тілінде 7569 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7569));
### Instruction: Java тілінде 7569 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(7569));
517,662
en
Java
factorial
advanced
Write a function in Java that calculates the factorial of 4872.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4872));
### Instruction: Write a function in Java that calculates the factorial of 4872. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4872));
16,174,954
kk
C#
logic_ops
advanced
C# тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2073 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2073; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
630,342
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 3542-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3542)); }
### Instruction: Unity тілінде 1-ден 3542-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3542)); }
51,051,874
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; }
3,086,571
en
Python
var_decl
beginner
How to declare a variable index with value 86717 in Python?
index = 86717
### Instruction: How to declare a variable index with value 86717 in Python? ### Response: index = 86717
57,924,658
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; }
949,355
kk
Python
var_decl
beginner
Python тілінде 529738 мәнімен x айнымалысын қалай жариялауға болады?
x = 529738
### Instruction: Python тілінде 529738 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 529738
2,669,969
ru
C#
var_decl
beginner
Как объявить переменную timer со значением 195390 в C#?
int timer = 195390;
### Instruction: Как объявить переменную timer со значением 195390 в C#? ### Response: int timer = 195390;
291,687
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 6068.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6068) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 6068. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(6068) << std::endl;
85,105,358
kk
C++
string_ops
advanced
C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: C++ тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
25,983,869
en
JavaScript
string_ops
intermediate
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;
83,223,503
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; }
49,934,933
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2039 високосным.
public bool IsLeap() { int y = 2039; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2039 високосным. ### Response: public bool IsLeap() { int y = 2039; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
25,037,351
kk
Java
logic_ops
advanced
Java тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1941; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
161,154
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 1477.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1477)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 1477. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(1477)); }
93,049,594
en
C#
logic_ops
advanced
Write a function that determines if the number 242 is prime in C#.
public bool IsPrime() { int n = 242; 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 242 is prime in C#. ### Response: public bool IsPrime() { int n = 242; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
663,301
en
Python
var_decl
beginner
How to declare a variable index with value 415786 in Python?
index = 415786
### Instruction: How to declare a variable index with value 415786 in Python? ### Response: index = 415786
20,608,662
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; }
479,291
en
C++
sum_n
intermediate
Write a function in C++ that sums numbers from 1 to 3584.
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(3584) << std::endl;
### Instruction: Write a function in C++ that sums numbers from 1 to 3584. ### 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(3584) << std::endl;
1,493,174
kk
JavaScript
var_decl
beginner
JavaScript тілінде 408944 мәнімен count айнымалысын қалай жариялауға болады?
let count = 408944;
### Instruction: JavaScript тілінде 408944 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 408944;
47,875,836
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1989 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1989; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
49,736,667
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(); }
10,544,173
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();
1,439,939
kk
Python
var_decl
beginner
Python тілінде 851351 мәнімен offset айнымалысын қалай жариялауға болады?
offset = 851351
### Instruction: Python тілінде 851351 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: offset = 851351
791,079
ru
C#
var_decl
beginner
Как объявить переменную health со значением 518892 в C#?
int health = 518892;
### Instruction: Как объявить переменную health со значением 518892 в C#? ### Response: int health = 518892;
73,216,937
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; }
3,970,180
kk
Python
var_decl
beginner
Python тілінде 5349 мәнімен x айнымалысын қалай жариялауға болады?
x = 5349
### Instruction: Python тілінде 5349 мәнімен x айнымалысын қалай жариялауға болады? ### Response: x = 5349
2,891,652
kk
Java
var_decl
beginner
Java тілінде 486811 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 486811;
### Instruction: Java тілінде 486811 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 486811;
41,828,719
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
2,361,767
en
Unity
var_decl
beginner
How to declare a variable count with value 980871 in Unity?
int count = 980871;
### Instruction: How to declare a variable count with value 980871 in Unity? ### Response: int count = 980871;
3,410,873
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 304315 в Unity?
int weight = 304315;
### Instruction: Как объявить переменную weight со значением 304315 в Unity? ### Response: int weight = 304315;
3,021,777
en
Java
var_decl
beginner
How to declare a variable rate with value 686127 in Java?
int rate = 686127;
### Instruction: How to declare a variable rate with value 686127 in Java? ### Response: int rate = 686127;
68,423,125
en
Java
string_ops
intermediate
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
85,036,511
kk
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); }
23,258,064
en
Python
string_ops
intermediate
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]