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
98,644,476
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); }
2,374,444
en
C#
var_decl
beginner
How to declare a variable data with value 716457 in C#?
int data = 716457;
### Instruction: How to declare a variable data with value 716457 in C#? ### Response: int data = 716457;
58,629,675
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; }
29,092,657
kk
Java
logic_ops
intermediate
Java тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1931; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 1931 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1931; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
13,175,513
kk
Unity
string_ops
advanced
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; }
1,932,449
ru
C++
var_decl
beginner
Как объявить переменную size со значением 234440 в C++?
int size = 234440;
### Instruction: Как объявить переменную size со значением 234440 в C++? ### Response: int size = 234440;
99,083,803
kk
Unity
logic_ops
intermediate
Unity тилінде 410 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 410; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 410 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 410; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
26,910,978
ru
C#
logic_ops
intermediate
Напишите на C# функцию, определяющую, является ли число 86 простым.
public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 86 простым. ### Response: public bool IsPrime() { int n = 86; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
53,123,549
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); }
4,615,463
en
Unity
var_decl
beginner
How to declare a variable count with value 972097 in Unity?
int count = 972097;
### Instruction: How to declare a variable count with value 972097 in Unity? ### Response: int count = 972097;
4,636,825
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 10166 в Unity?
int size = 10166;
### Instruction: Как объявить переменную size со значением 10166 в Unity? ### Response: int size = 10166;
50,935,828
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,657,610
kk
C#
var_decl
beginner
C# тілінде 470629 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 470629;
### Instruction: C# тілінде 470629 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 470629;
25,964,704
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; }
2,324,439
kk
Python
var_decl
beginner
Python тілінде 306029 мәнімен data айнымалысын қалай жариялауға болады?
data = 306029
### Instruction: Python тілінде 306029 мәнімен data айнымалысын қалай жариялауға болады? ### Response: data = 306029
69,338,084
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; }
49,126,637
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
161,405
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 6301.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6301));
### Instruction: Write a function in Java that sums numbers from 1 to 6301. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(6301));
906,892
en
Python
var_decl
beginner
How to declare a variable index with value 465744 in Python?
index = 465744
### Instruction: How to declare a variable index with value 465744 in Python? ### Response: index = 465744
3,978,820
en
Python
var_decl
beginner
How to declare a variable y with value 179749 in Python?
y = 179749
### Instruction: How to declare a variable y with value 179749 in Python? ### Response: y = 179749
19,462,381
en
Python
logic_ops
advanced
Write logic to check if the year 1997 is a leap year in Python.
def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1997 is a leap year in Python. ### Response: def is_leap(): year = 1997 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,265,107
ru
Python
var_decl
beginner
Как объявить переменную score со значением 229579 в Python?
score = 229579
### Instruction: Как объявить переменную score со значением 229579 в Python? ### Response: score = 229579
88,283,827
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C++ функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,421,089
ru
C#
var_decl
beginner
Как объявить переменную x со значением 831654 в C#?
int x = 831654;
### Instruction: Как объявить переменную x со значением 831654 в C#? ### Response: int x = 831654;
65,596,062
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2008 високосным.
public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2008 високосным. ### Response: public bool IsLeap() { int y = 2008; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
65,890,319
kk
Python
logic_ops
intermediate
Python тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2046 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2046 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2046 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
32,319,421
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1988 високосным.
public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1988 високосным. ### Response: public bool IsLeap() { int y = 1988; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,005,151
en
C++
var_decl
beginner
How to declare a variable value with value 90088 in C++?
int value = 90088;
### Instruction: How to declare a variable value with value 90088 in C++? ### Response: int value = 90088;
30,610,228
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(); }
23,069,150
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 111 простым.
public bool IsPrime() { int n = 111; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 111 простым. ### Response: public bool IsPrime() { int n = 111; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
767,947
kk
C++
var_decl
beginner
C++ тілінде 537826 мәнімен value айнымалысын қалай жариялауға болады?
int value = 537826;
### Instruction: C++ тілінде 537826 мәнімен value айнымалысын қалай жариялауға болады? ### Response: int value = 537826;
2,675,623
kk
Unity
var_decl
beginner
Unity тілінде 563322 мәнімен x айнымалысын қалай жариялауға болады?
int x = 563322;
### Instruction: Unity тілінде 563322 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 563322;
95,926,707
en
Unity
array_ops
advanced
Write a function that finds the maximum number in an array in Unity.
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 Unity. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
3,032,693
ru
Java
var_decl
beginner
Как объявить переменную buffer со значением 711312 в Java?
int buffer = 711312;
### Instruction: Как объявить переменную buffer со значением 711312 в Java? ### Response: int buffer = 711312;
86,733,315
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
24,776,339
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C# функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
2,767,929
en
C#
var_decl
beginner
How to declare a variable timer with value 642049 in C#?
int timer = 642049;
### Instruction: How to declare a variable timer with value 642049 in C#? ### Response: int timer = 642049;
1,955,105
kk
C++
var_decl
beginner
C++ тілінде 684909 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 684909;
### Instruction: C++ тілінде 684909 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 684909;
66,978,925
kk
C++
logic_ops
intermediate
C++ тилінде 296 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 296; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 296 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 296; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,371,989
kk
Python
string_ops
advanced
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аеёиоуыэюя')
1,374,736
ru
Python
var_decl
beginner
Как объявить переменную timer со значением 154003 в Python?
timer = 154003
### Instruction: Как объявить переменную timer со значением 154003 в Python? ### Response: timer = 154003
542,908
kk
Java
var_decl
beginner
Java тілінде 882334 мәнімен count айнымалысын қалай жариялауға болады?
int count = 882334;
### Instruction: Java тілінде 882334 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 882334;
62,760,942
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 348 простым.
public bool IsPrime() { int n = 348; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 348 простым. ### Response: public bool IsPrime() { int n = 348; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,376,462
ru
Python
var_decl
beginner
Как объявить переменную data со значением 536409 в Python?
data = 536409
### Instruction: Как объявить переменную data со значением 536409 в Python? ### Response: data = 536409
56,343,805
kk
Python
logic_ops
intermediate
Python тилінде 367 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 367 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 367 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 367 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
85,537
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 2659.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2659)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 2659. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(2659)); }
1,732,692
en
C++
var_decl
beginner
How to declare a variable y with value 815746 in C++?
int y = 815746;
### Instruction: How to declare a variable y with value 815746 in C++? ### Response: int y = 815746;
55,892,579
kk
Unity
logic_ops
intermediate
Unity тилінде 115 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 115; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 115 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 115; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
71,828,621
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)
18,303,313
ru
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; }
89,351,917
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
174,159
kk
C++
factorial
advanced
C++ тілінде 3373 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3373) << std::endl;
### Instruction: C++ тілінде 3373 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3373) << std::endl;
66,904,569
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; }
866,902
kk
C#
var_decl
beginner
C# тілінде 783449 мәнімен speed айнымалысын қалай жариялауға болады?
int speed = 783449;
### Instruction: C# тілінде 783449 мәнімен speed айнымалысын қалай жариялауға болады? ### Response: int speed = 783449;
1,666,214
kk
Unity
var_decl
beginner
Unity тілінде 486702 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 486702;
### Instruction: Unity тілінде 486702 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 486702;
79,181,713
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]
93,982,650
en
Unity
string_ops
intermediate
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; }
4,777,721
en
Unity
var_decl
beginner
How to declare a variable y with value 4363 in Unity?
int y = 4363;
### Instruction: How to declare a variable y with value 4363 in Unity? ### Response: int y = 4363;
1,712,566
ru
C++
var_decl
beginner
Как объявить переменную value со значением 43983 в C++?
int value = 43983;
### Instruction: Как объявить переменную value со значением 43983 в C++? ### Response: int value = 43983;
59,034,367
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; }
56,925,546
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
313,826
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 3866.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3866)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 3866. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3866)); }
712,908
kk
Unity
sum_n
intermediate
Unity тілінде 1-ден 379-ге дейінгі сандардың қосындысын есептейтін функция жаз.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(379)); }
### Instruction: Unity тілінде 1-ден 379-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(379)); }
1,430,497
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 54394 в C#?
int speed = 54394;
### Instruction: Как объявить переменную speed со значением 54394 в C#? ### Response: int speed = 54394;
90,277,187
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();
440,954
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 1395.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1395) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 1395. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1395) << std::endl;
42,535,802
en
Unity
logic_ops
intermediate
Write a function that determines if the number 268 is prime in Unity.
public bool IsPrime() { int n = 268; 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 268 is prime in Unity. ### Response: public bool IsPrime() { int n = 268; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
47,316,841
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2027 високосным.
public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2027 високосным. ### Response: public bool IsLeap() { int y = 2027; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
99,866,884
en
JavaScript
logic_ops
advanced
Write logic to check if the year 2030 is a leap year in JavaScript.
function isLeap() { let y = 2030; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 2030 is a leap year in JavaScript. ### Response: function isLeap() { let y = 2030; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
89,022,111
ru
Unity
string_ops
advanced
Напишите на 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; }
12,968,154
en
Unity
logic_ops
advanced
Write a function that determines if the number 326 is prime in Unity.
public bool IsPrime() { int n = 326; 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 326 is prime in Unity. ### Response: public bool IsPrime() { int n = 326; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
403,244
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 4573.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4573));
### Instruction: Write a function in C# that calculates the factorial of 4573. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4573));
611,612
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 9080.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9080));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 9080. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(9080));
757,965
en
Python
var_decl
beginner
How to declare a variable weight with value 708351 in Python?
weight = 708351
### Instruction: How to declare a variable weight with value 708351 in Python? ### Response: weight = 708351
464,808
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 3275.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3275)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 3275. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(3275)); }
88,239,202
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1962 високосным.
def is_leap(): year = 1962 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1962 високосным. ### Response: def is_leap(): year = 1962 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
58,081,446
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; }
92,248,707
kk
Java
string_ops
advanced
Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Java тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,407,174
en
Unity
var_decl
beginner
How to declare a variable size with value 402645 in Unity?
int size = 402645;
### Instruction: How to declare a variable size with value 402645 in Unity? ### Response: int size = 402645;
87,362,336
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; }
2,916,587
kk
JavaScript
var_decl
beginner
JavaScript тілінде 80679 мәнімен x айнымалысын қалай жариялауға болады?
let x = 80679;
### Instruction: JavaScript тілінде 80679 мәнімен x айнымалысын қалай жариялауға болады? ### Response: let x = 80679;
41,646,874
en
Java
array_ops
intermediate
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; }
92,640,958
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
54,081,052
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(); }
90,359,089
en
Unity
string_ops
advanced
Write a function that converts a string to uppercase in Unity.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in Unity. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
1,829,433
kk
Python
var_decl
beginner
Python тілінде 841961 мәнімен index айнымалысын қалай жариялауға болады?
index = 841961
### Instruction: Python тілінде 841961 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 841961
997,137
en
C#
var_decl
beginner
How to declare a variable rate with value 742524 in C#?
int rate = 742524;
### Instruction: How to declare a variable rate with value 742524 in C#? ### Response: int rate = 742524;
87,253,729
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая фильтрует только четные числа из списка.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Напишите на JavaScript функцию, которая фильтрует только четные числа из списка. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
67,178,847
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,086,734
en
Java
var_decl
beginner
How to declare a variable total with value 20456 in Java?
int total = 20456;
### Instruction: How to declare a variable total with value 20456 in Java? ### Response: int total = 20456;
2,488,178
kk
Java
var_decl
beginner
Java тілінде 865020 мәнімен total айнымалысын қалай жариялауға болады?
int total = 865020;
### Instruction: Java тілінде 865020 мәнімен total айнымалысын қалай жариялауға болады? ### Response: int total = 865020;
13,572,436
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на C++ функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
28,791,677
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; }
553,964
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 6929.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6929));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 6929. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(6929));
54,655,184
kk
C++
logic_ops
intermediate
C++ тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2080 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2080; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
52,119,311
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; }
25,740,598
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(); }
3,050,988
kk
Java
var_decl
beginner
Java тілінде 843998 мәнімен count айнымалысын қалай жариялауға болады?
int count = 843998;
### Instruction: Java тілінде 843998 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 843998;
4,836,532
en
Unity
var_decl
beginner
How to declare a variable buffer with value 411990 in Unity?
int buffer = 411990;
### Instruction: How to declare a variable buffer with value 411990 in Unity? ### Response: int buffer = 411990;
3,375,380
ru
Unity
var_decl
beginner
Как объявить переменную level со значением 829097 в Unity?
int level = 829097;
### Instruction: Как объявить переменную level со значением 829097 в Unity? ### Response: int level = 829097;