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,111,373
kk
Unity
factorial
advanced
Unity тілінде 6013 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6013)); }
### Instruction: Unity тілінде 6013 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(6013)); }
4,699,652
en
Unity
var_decl
beginner
How to declare a variable index with value 792337 in Unity?
int index = 792337;
### Instruction: How to declare a variable index with value 792337 in Unity? ### Response: int index = 792337;
691,752
en
Java
var_decl
beginner
How to declare a variable x with value 385203 in Java?
int x = 385203;
### Instruction: How to declare a variable x with value 385203 in Java? ### Response: int x = 385203;
845,573
en
Python
var_decl
beginner
How to declare a variable y with value 435843 in Python?
y = 435843
### Instruction: How to declare a variable y with value 435843 in Python? ### Response: y = 435843
94,104,221
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
56,299,207
en
Unity
logic_ops
intermediate
Write logic to check if the year 1964 is a leap year in Unity.
public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1964 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1964; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
88,682,139
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; }
4,598,562
en
Java
var_decl
beginner
How to declare a variable timer with value 447944 in Java?
int timer = 447944;
### Instruction: How to declare a variable timer with value 447944 in Java? ### Response: int timer = 447944;
25,406,298
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('');
40,415,292
kk
Python
logic_ops
intermediate
Python тилінде 306 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 306 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 306 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 306 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
28,831,007
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; }
80,819,207
kk
Unity
logic_ops
advanced
Unity тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 1927 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1927; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,811,250
en
Java
var_decl
beginner
How to declare a variable offset with value 478526 in Java?
int offset = 478526;
### Instruction: How to declare a variable offset with value 478526 in Java? ### Response: int offset = 478526;
65,267,913
kk
Unity
logic_ops
advanced
Unity тилінде 2042 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2042 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2042; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,365,360
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 505455 в Unity?
int buffer = 505455;
### Instruction: Как объявить переменную buffer со значением 505455 в Unity? ### Response: int buffer = 505455;
4,036,316
ru
C#
var_decl
beginner
Как объявить переменную score со значением 236075 в C#?
int score = 236075;
### Instruction: Как объявить переменную score со значением 236075 в C#? ### Response: int score = 236075;
48,041,726
kk
Python
logic_ops
advanced
Python тилінде 468 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 468 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 468 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 468 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
58,514,387
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 1922 високосным.
public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1922 високосным. ### Response: public bool IsLeap() { int y = 1922; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,612,300
en
Java
var_decl
beginner
How to declare a variable value with value 823881 in Java?
int value = 823881;
### Instruction: How to declare a variable value with value 823881 in Java? ### Response: int value = 823881;
46,689,461
kk
C++
array_ops
advanced
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,463,286
kk
Unity
var_decl
beginner
Unity тілінде 824907 мәнімен health айнымалысын қалай жариялауға болады?
int health = 824907;
### Instruction: Unity тілінде 824907 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 824907;
46,984,771
ru
Java
string_ops
intermediate
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
461,710
ru
Unity
factorial
advanced
Напиши функцию на Unity, которая вычисляет факториал числа 9393.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9393)); }
### Instruction: Напиши функцию на Unity, которая вычисляет факториал числа 9393. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(9393)); }
4,614,015
ru
C#
var_decl
beginner
Как объявить переменную buffer со значением 945296 в C#?
int buffer = 945296;
### Instruction: Как объявить переменную buffer со значением 945296 в C#? ### Response: int buffer = 945296;
82,925,396
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; }
58,410,299
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; }
36,340,001
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; }
67,222,648
kk
C#
logic_ops
intermediate
C# тилінде 200 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 200; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 200 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 200; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,339,843
kk
C++
var_decl
beginner
C++ тілінде 524780 мәнімен index айнымалысын қалай жариялауға болады?
int index = 524780;
### Instruction: C++ тілінде 524780 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 524780;
489,264
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 1724.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1724)); }
### Instruction: Write a function in Unity that calculates the factorial of 1724. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(1724)); }
651,571
en
Java
var_decl
beginner
How to declare a variable y with value 793353 in Java?
int y = 793353;
### Instruction: How to declare a variable y with value 793353 in Java? ### Response: int y = 793353;
235,794
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 7520.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7520));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 7520. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(7520));
78,964,681
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
3,755,840
en
Java
var_decl
beginner
How to declare a variable count with value 121807 in Java?
int count = 121807;
### Instruction: How to declare a variable count with value 121807 in Java? ### Response: int count = 121807;
89,303
kk
JavaScript
sum_n
intermediate
JavaScript тілінде 1-ден 6916-ге дейінгі сандардың қосындысын есептейтін функция жаз.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6916));
### Instruction: JavaScript тілінде 1-ден 6916-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6916));
97,142,858
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 492 is prime in JavaScript.
function isPrime() { let n = 492; 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 492 is prime in JavaScript. ### Response: function isPrime() { let n = 492; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
23,256,956
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; }
12,686,926
kk
C#
array_ops
advanced
C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C# тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
87,919,573
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1948 високосным.
public bool IsLeap() { int y = 1948; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1948 високосным. ### Response: public bool IsLeap() { int y = 1948; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
909,927
kk
C++
var_decl
beginner
C++ тілінде 929556 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 929556;
### Instruction: C++ тілінде 929556 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 929556;
1,711,317
ru
Java
var_decl
beginner
Как объявить переменную value со значением 714903 в Java?
int value = 714903;
### Instruction: Как объявить переменную value со значением 714903 в Java? ### Response: int value = 714903;
590,047
kk
Java
factorial
advanced
Java тілінде 356 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(356));
### Instruction: Java тілінде 356 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(356));
422,913
kk
JavaScript
factorial
advanced
JavaScript тілінде 2135 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2135));
### Instruction: JavaScript тілінде 2135 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(2135));
539,513
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 5849.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5849));
### Instruction: Write a function in C# that calculates the factorial of 5849. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5849));
4,328,035
kk
C++
var_decl
beginner
C++ тілінде 280831 мәнімен health айнымалысын қалай жариялауға болады?
int health = 280831;
### Instruction: C++ тілінде 280831 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 280831;
12,353,750
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; }
16,248,609
en
Java
array_ops
advanced
Write a function that finds the maximum number in an array in Java.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in Java. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
29,034,342
en
Python
logic_ops
intermediate
Write logic to check if the year 2014 is a leap year in Python.
def is_leap(): year = 2014 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2014 is a leap year in Python. ### Response: def is_leap(): year = 2014 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,717,439
kk
C#
var_decl
beginner
C# тілінде 651180 мәнімен amount айнымалысын қалай жариялауға болады?
int amount = 651180;
### Instruction: C# тілінде 651180 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: int amount = 651180;
204,053
kk
C#
sum_n
intermediate
C# тілінде 1-ден 2044-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2044));
### Instruction: C# тілінде 1-ден 2044-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(2044));
92,552,653
kk
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; }
2,337,938
en
Unity
var_decl
beginner
How to declare a variable amount with value 237696 in Unity?
int amount = 237696;
### Instruction: How to declare a variable amount with value 237696 in Unity? ### Response: int amount = 237696;
73,250,066
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 2092 високосным.
public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 2092 високосным. ### Response: public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
42,954,725
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; }
72,340,930
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
909,659
kk
C#
var_decl
beginner
C# тілінде 216218 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 216218;
### Instruction: C# тілінде 216218 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 216218;
91,453,908
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; }
1,714,647
kk
Unity
var_decl
beginner
Unity тілінде 557379 мәнімен index айнымалысын қалай жариялауға болады?
int index = 557379;
### Instruction: Unity тілінде 557379 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 557379;
25,009,929
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; }
3,209,515
ru
C#
var_decl
beginner
Как объявить переменную index со значением 582991 в C#?
int index = 582991;
### Instruction: Как объявить переменную index со значением 582991 в C#? ### Response: int index = 582991;
58,449,304
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]
98,233,347
en
Unity
array_ops
advanced
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); }
1,991,732
en
C#
var_decl
beginner
How to declare a variable value with value 637687 in C#?
int value = 637687;
### Instruction: How to declare a variable value with value 637687 in C#? ### Response: int value = 637687;
282,554
ru
JavaScript
factorial
advanced
Напиши функцию на JavaScript, которая вычисляет факториал числа 7102.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7102));
### Instruction: Напиши функцию на JavaScript, которая вычисляет факториал числа 7102. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(7102));
4,260,471
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 438155 в Unity?
int index = 438155;
### Instruction: Как объявить переменную index со значением 438155 в Unity? ### Response: int index = 438155;
25,835,012
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; }
909,044
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 934987 в Java?
int rate = 934987;
### Instruction: Как объявить переменную rate со значением 934987 в Java? ### Response: int rate = 934987;
3,498,881
en
Java
var_decl
beginner
How to declare a variable x with value 8572 in Java?
int x = 8572;
### Instruction: How to declare a variable x with value 8572 in Java? ### Response: int x = 8572;
16,927,209
en
C++
logic_ops
intermediate
Write logic to check if the year 2012 is a leap year in C++.
public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2012 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2012; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
43,586,480
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]
74,386,723
en
Unity
logic_ops
advanced
Write logic to check if the year 2095 is a leap year in Unity.
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 Unity. ### Response: public bool IsLeap() { int y = 2095; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
85,861,343
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); }
16,552,100
ru
Unity
logic_ops
intermediate
Напишите на Unity логику проверки, является ли год 1954 високосным.
public bool IsLeap() { int y = 1954; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1954 високосным. ### Response: public bool IsLeap() { int y = 1954; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,457,372
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 389330 в C++?
int offset = 389330;
### Instruction: Как объявить переменную offset со значением 389330 в C++? ### Response: int offset = 389330;
1,109,100
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 984625 в C++?
int weight = 984625;
### Instruction: Как объявить переменную weight со значением 984625 в C++? ### Response: int weight = 984625;
1,173,569
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 972219 в Unity?
int speed = 972219;
### Instruction: Как объявить переменную speed со значением 972219 в Unity? ### Response: int speed = 972219;
71,517,244
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2077 високосным.
public bool IsLeap() { int y = 2077; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2077 високосным. ### Response: public bool IsLeap() { int y = 2077; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
78,043,399
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; }
40,113,787
en
JavaScript
array_ops
intermediate
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);
516,322
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 862604 в Unity?
int speed = 862604;
### Instruction: Как объявить переменную speed со значением 862604 в Unity? ### Response: int speed = 862604;
87,665,824
kk
Python
logic_ops
intermediate
Python тилінде 356 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 356 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 356 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 356 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
36,230,577
en
Java
string_ops
advanced
Write a function that converts a string to uppercase in Java.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Java. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
50,350,047
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
3,515,155
en
Unity
var_decl
beginner
How to declare a variable data with value 414474 in Unity?
int data = 414474;
### Instruction: How to declare a variable data with value 414474 in Unity? ### Response: int data = 414474;
61,764,466
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; }
68,930,777
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(); }
27,805,578
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 108 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 108; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 108 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 108; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
33,326,960
en
Python
logic_ops
advanced
Write logic to check if the year 2032 is a leap year in Python.
def is_leap(): year = 2032 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2032 is a leap year in Python. ### Response: def is_leap(): year = 2032 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
48,052,535
kk
Unity
logic_ops
intermediate
Unity тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 478; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 478 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 478; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
58,920,273
en
Java
logic_ops
intermediate
Write logic to check if the year 2070 is a leap year in Java.
public bool IsLeap() { int y = 2070; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2070 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2070; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,060,119
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; }
93,641,131
ru
C#
array_ops
advanced
Напишите на C# функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C# функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
61,299,696
kk
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; }
13,405,753
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая считает количество гласных букв в тексте.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Напишите на JavaScript функцию, которая считает количество гласных букв в тексте. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
4,085,152
en
Java
var_decl
beginner
How to declare a variable y with value 447255 in Java?
int y = 447255;
### Instruction: How to declare a variable y with value 447255 in Java? ### Response: int y = 447255;
23,204,713
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; }
4,991,478
kk
C++
var_decl
beginner
C++ тілінде 345134 мәнімен index айнымалысын қалай жариялауға болады?
int index = 345134;
### Instruction: C++ тілінде 345134 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 345134;
21,135,967
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
138,900
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 8724.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8724) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 8724. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8724) << std::endl;
1,770,368
en
Unity
var_decl
beginner
How to declare a variable x with value 572342 in Unity?
int x = 572342;
### Instruction: How to declare a variable x with value 572342 in Unity? ### Response: int x = 572342;