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
2,955,675
ru
Python
var_decl
beginner
Как объявить переменную data со значением 585916 в Python?
data = 585916
### Instruction: Как объявить переменную data со значением 585916 в Python? ### Response: data = 585916
4,685,094
ru
Python
var_decl
beginner
Как объявить переменную offset со значением 566810 в Python?
offset = 566810
### Instruction: Как объявить переменную offset со значением 566810 в Python? ### Response: offset = 566810
3,189,452
ru
Unity
var_decl
beginner
Как объявить переменную buffer со значением 552301 в Unity?
int buffer = 552301;
### Instruction: Как объявить переменную buffer со значением 552301 в Unity? ### Response: int buffer = 552301;
17,768,007
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in 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: Write a function that filters only even numbers from a list in 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,266,119
ru
JavaScript
var_decl
beginner
Как объявить переменную level со значением 968936 в JavaScript?
let level = 968936;
### Instruction: Как объявить переменную level со значением 968936 в JavaScript? ### Response: let level = 968936;
86,633,400
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(); }
69,535,605
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; }
87,004,740
kk
Python
logic_ops
intermediate
Python тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 2018 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 2018 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 2018 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
4,884,304
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 868693 в Unity?
int total = 868693;
### Instruction: Как объявить переменную total со значением 868693 в Unity? ### Response: int total = 868693;
24,417,019
en
C#
string_ops
advanced
Write a function that counts vowels in a text in C#.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in C#. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
3,365,252
kk
Java
var_decl
beginner
Java тілінде 612572 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 612572;
### Instruction: Java тілінде 612572 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 612572;
52,243,491
kk
Java
string_ops
intermediate
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
63,405,883
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); }
960,399
en
Python
var_decl
beginner
How to declare a variable value with value 901507 in Python?
value = 901507
### Instruction: How to declare a variable value with value 901507 in Python? ### Response: value = 901507
61,154,963
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 1972 високосным.
def is_leap(): year = 1972 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1972 високосным. ### Response: def is_leap(): year = 1972 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
46,867
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 9018.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9018))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 9018. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(9018))
3,101,494
kk
Java
var_decl
beginner
Java тілінде 389051 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 389051;
### Instruction: Java тілінде 389051 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 389051;
605,616
kk
Java
factorial
advanced
Java тілінде 4335 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4335));
### Instruction: Java тілінде 4335 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4335));
86,557,684
kk
Unity
logic_ops
advanced
Unity тилінде 259 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 259; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 259 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 259; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
183,516
kk
C#
sum_n
intermediate
C# тілінде 1-ден 4609-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4609));
### Instruction: C# тілінде 1-ден 4609-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(4609));
62,006,973
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; }
59,703,995
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
15,931,795
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; }
46,998,801
kk
C++
logic_ops
intermediate
C++ тилінде 2092 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2092 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2092; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
91,451,442
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; }
90,271,886
en
Java
logic_ops
advanced
Write a function that determines if the number 270 is prime in Java.
public bool IsPrime() { int n = 270; 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 270 is prime in Java. ### Response: public bool IsPrime() { int n = 270; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
44,580,676
kk
C++
string_ops
intermediate
C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C++ тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,634,103
kk
Java
var_decl
beginner
Java тілінде 979104 мәнімен health айнымалысын қалай жариялауға болады?
int health = 979104;
### Instruction: Java тілінде 979104 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 979104;
39,000,687
en
C#
string_ops
intermediate
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(); }
2,411,813
ru
Java
var_decl
beginner
Как объявить переменную rate со значением 502319 в Java?
int rate = 502319;
### Instruction: Как объявить переменную rate со значением 502319 в Java? ### Response: int rate = 502319;
93,122,739
en
JavaScript
array_ops
intermediate
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
51,043,618
kk
C#
logic_ops
advanced
C# тилінде 1971 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 1971 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
10,103,183
ru
Java
string_ops
advanced
Напишите на Java функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Java функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
96,785
kk
Java
sum_n
intermediate
Java тілінде 1-ден 923-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(923));
### Instruction: Java тілінде 1-ден 923-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(923));
15,975,707
kk
C++
logic_ops
advanced
C++ тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2051 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2051; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
70,884,692
en
C++
logic_ops
advanced
Write logic to check if the year 2015 is a leap year in C++.
public bool IsLeap() { int y = 2015; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2015 is a leap year in C++. ### Response: public bool IsLeap() { int y = 2015; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
21,983,323
en
Python
logic_ops
intermediate
Write logic to check if the year 1981 is a leap year in Python.
def is_leap(): year = 1981 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1981 is a leap year in Python. ### Response: def is_leap(): year = 1981 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
1,442,343
ru
C#
var_decl
beginner
Как объявить переменную rate со значением 512703 в C#?
int rate = 512703;
### Instruction: Как объявить переменную rate со значением 512703 в C#? ### Response: int rate = 512703;
20,817,029
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); }
1,494,805
kk
Python
var_decl
beginner
Python тілінде 431002 мәнімен count айнымалысын қалай жариялауға болады?
count = 431002
### Instruction: Python тілінде 431002 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 431002
926,059
ru
C++
var_decl
beginner
Как объявить переменную level со значением 651228 в C++?
int level = 651228;
### Instruction: Как объявить переменную level со значением 651228 в C++? ### Response: int level = 651228;
1,726,475
en
C#
var_decl
beginner
How to declare a variable total with value 881019 in C#?
int total = 881019;
### Instruction: How to declare a variable total with value 881019 in C#? ### Response: int total = 881019;
1,355,557
en
C++
var_decl
beginner
How to declare a variable timer with value 406026 in C++?
int timer = 406026;
### Instruction: How to declare a variable timer with value 406026 in C++? ### Response: int timer = 406026;
85,553,734
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 126 простым.
public bool IsPrime() { int n = 126; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 126 простым. ### Response: public bool IsPrime() { int n = 126; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
61,680,663
kk
Java
array_ops
intermediate
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; }
59,850,794
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; }
4,999,631
en
C#
var_decl
beginner
How to declare a variable index with value 801763 in C#?
int index = 801763;
### Instruction: How to declare a variable index with value 801763 in C#? ### Response: int index = 801763;
2,758,060
en
Python
var_decl
beginner
How to declare a variable offset with value 274441 in Python?
offset = 274441
### Instruction: How to declare a variable offset with value 274441 in Python? ### Response: offset = 274441
3,891,698
en
Unity
var_decl
beginner
How to declare a variable health with value 543450 in Unity?
int health = 543450;
### Instruction: How to declare a variable health with value 543450 in Unity? ### Response: int health = 543450;
143,793
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 2271.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2271));
### Instruction: Write a function in Java that sums numbers from 1 to 2271. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(2271));
2,464,063
ru
Java
var_decl
beginner
Как объявить переменную data со значением 422456 в Java?
int data = 422456;
### Instruction: Как объявить переменную data со значением 422456 в Java? ### Response: int data = 422456;
63,437,198
en
C++
array_ops
intermediate
Write a function that finds the maximum number in an array in C++.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C++. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
64,346,108
ru
JavaScript
array_ops
intermediate
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
2,633,704
ru
Unity
var_decl
beginner
Как объявить переменную index со значением 236223 в Unity?
int index = 236223;
### Instruction: Как объявить переменную index со значением 236223 в Unity? ### Response: int index = 236223;
1,824,362
en
C++
var_decl
beginner
How to declare a variable count with value 988813 in C++?
int count = 988813;
### Instruction: How to declare a variable count with value 988813 in C++? ### Response: int count = 988813;
1,833,635
en
Unity
var_decl
beginner
How to declare a variable y with value 954843 in Unity?
int y = 954843;
### Instruction: How to declare a variable y with value 954843 in Unity? ### Response: int y = 954843;
391,997
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 7840.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7840) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 7840. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(7840) << std::endl;
71,778,655
kk
C#
logic_ops
advanced
C# тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2081 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2081; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
74,876
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 3973.
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(3973) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 3973. ### 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(3973) << std::endl;
4,550,277
kk
Python
var_decl
beginner
Python тілінде 601033 мәнімен weight айнымалысын қалай жариялауға болады?
weight = 601033
### Instruction: Python тілінде 601033 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: weight = 601033
4,893,100
kk
C#
var_decl
beginner
C# тілінде 337573 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 337573;
### Instruction: C# тілінде 337573 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 337573;
28,794,072
kk
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);
121,637
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5325.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5325));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5325. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5325));
405,999
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 5341.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5341));
### Instruction: Write a function in C# that calculates the factorial of 5341. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5341));
2,196,709
en
Unity
var_decl
beginner
How to declare a variable y with value 922471 in Unity?
int y = 922471;
### Instruction: How to declare a variable y with value 922471 in Unity? ### Response: int y = 922471;
3,058,512
ru
Java
var_decl
beginner
Как объявить переменную speed со значением 193401 в Java?
int speed = 193401;
### Instruction: Как объявить переменную speed со значением 193401 в Java? ### Response: int speed = 193401;
84,742,324
kk
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,610,932
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,435,599
en
C++
var_decl
beginner
How to declare a variable timer with value 306998 in C++?
int timer = 306998;
### Instruction: How to declare a variable timer with value 306998 in C++? ### Response: int timer = 306998;
35,722,876
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
194,121
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 5740.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5740)); }
### Instruction: Write a function in Unity that calculates the factorial of 5740. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(5740)); }
79,672,500
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; }
52,839,735
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 1921 високосным.
public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1921 високосным. ### Response: public bool IsLeap() { int y = 1921; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
46,422,157
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); }
3,274,682
ru
Java
var_decl
beginner
Как объявить переменную x со значением 182189 в Java?
int x = 182189;
### Instruction: Как объявить переменную x со значением 182189 в Java? ### Response: int x = 182189;
86,187,752
kk
Java
logic_ops
advanced
Java тилінде 2091 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2091 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2091; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
15,980
kk
Python
factorial
advanced
Python тілінде 8454 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8454))
### Instruction: Python тілінде 8454 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8454))
85,675,707
ru
Python
logic_ops
advanced
Напишите на Python функцию, определяющую, является ли число 245 простым.
def is_prime(): n = 245 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 245 простым. ### Response: def is_prime(): n = 245 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
92,336,788
en
C#
array_ops
intermediate
Write a function that reverses a list in C#.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C#. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
87,848,079
kk
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аеёиоуыэюя')
68,085,644
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
18,320,935
kk
Java
array_ops
advanced
Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Java тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,395,864
ru
C#
var_decl
beginner
Как объявить переменную data со значением 392794 в C#?
int data = 392794;
### Instruction: Как объявить переменную data со значением 392794 в C#? ### Response: int data = 392794;
91,933
kk
Java
factorial
advanced
Java тілінде 6751 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6751));
### Instruction: Java тілінде 6751 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6751));
87,921,703
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 105 простым.
public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 105 простым. ### Response: public bool IsPrime() { int n = 105; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
31,086,680
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 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: Напишите на Java функцию, определяющую, является ли число 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,309,801
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 112216 в C++?
int buffer = 112216;
### Instruction: Как объявить переменную buffer со значением 112216 в C++? ### Response: int buffer = 112216;
24,087,026
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1926 високосным.
public bool IsLeap() { int y = 1926; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1926 високосным. ### Response: public bool IsLeap() { int y = 1926; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
290,671
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 8593.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8593))
### Instruction: Write a function in Python that sums numbers from 1 to 8593. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8593))
90,769,746
en
JavaScript
array_ops
advanced
Write a function that filters only even numbers from a list in JavaScript.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: Write a function that filters only even numbers from a list in JavaScript. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
2,843,362
ru
C++
var_decl
beginner
Как объявить переменную timer со значением 32886 в C++?
int timer = 32886;
### Instruction: Как объявить переменную timer со значением 32886 в C++? ### Response: int timer = 32886;
54,252,353
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); }
57,386,307
kk
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);
87,330,631
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();
88,406,271
kk
Unity
logic_ops
intermediate
Unity тилінде 412 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 412; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 412 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 412; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
63,129,583
kk
Java
string_ops
intermediate
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
50,661,611
en
C++
logic_ops
intermediate
Write logic to check if the year 1971 is a leap year in C++.
public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1971 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
128,494
kk
C++
sum_n
intermediate
C++ тілінде 1-ден 9302-ге дейінгі сандардың қосындысын есептейтін функция жаз.
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(9302) << std::endl;
### Instruction: C++ тілінде 1-ден 9302-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### 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(9302) << std::endl;
72,090,768
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; }
2,005,768
ru
JavaScript
var_decl
beginner
Как объявить переменную count со значением 686713 в JavaScript?
let count = 686713;
### Instruction: Как объявить переменную count со значением 686713 в JavaScript? ### Response: let count = 686713;