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,732,905
ru
JavaScript
var_decl
beginner
Как объявить переменную data со значением 606860 в JavaScript?
let data = 606860;
### Instruction: Как объявить переменную data со значением 606860 в JavaScript? ### Response: let data = 606860;
1,257,028
kk
JavaScript
var_decl
beginner
JavaScript тілінде 764467 мәнімен index айнымалысын қалай жариялауға болады?
let index = 764467;
### Instruction: JavaScript тілінде 764467 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 764467;
13,022,707
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; }
39,176,166
kk
Java
string_ops
intermediate
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; }
477,319
kk
C++
factorial
advanced
C++ тілінде 82 санының факториалын есептейтін функция жаз.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(82) << std::endl;
### Instruction: C++ тілінде 82 санының факториалын есептейтін функция жаз. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(82) << std::endl;
53,753,614
ru
Java
string_ops
intermediate
Напишите на 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; }
84,712,850
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;
33,252,536
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
58,626
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 1651.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1651) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 1651. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(1651) << std::endl;
1,847,325
en
Python
var_decl
beginner
How to declare a variable total with value 473184 in Python?
total = 473184
### Instruction: How to declare a variable total with value 473184 in Python? ### Response: total = 473184
2,053,286
ru
C++
var_decl
beginner
Как объявить переменную level со значением 388381 в C++?
int level = 388381;
### Instruction: Как объявить переменную level со значением 388381 в C++? ### Response: int level = 388381;
45,044,883
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1996 високосным.
public bool IsLeap() { int y = 1996; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1996 високосным. ### Response: public bool IsLeap() { int y = 1996; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,428,434
kk
C++
var_decl
beginner
C++ тілінде 309622 мәнімен level айнымалысын қалай жариялауға болады?
int level = 309622;
### Instruction: C++ тілінде 309622 мәнімен level айнымалысын қалай жариялауға болады? ### Response: int level = 309622;
3,521,535
en
Python
var_decl
beginner
How to declare a variable result with value 895279 in Python?
result = 895279
### Instruction: How to declare a variable result with value 895279 in Python? ### Response: result = 895279
3,246,122
ru
C#
var_decl
beginner
Как объявить переменную size со значением 910005 в C#?
int size = 910005;
### Instruction: Как объявить переменную size со значением 910005 в C#? ### Response: int size = 910005;
2,657,997
ru
C++
var_decl
beginner
Как объявить переменную result со значением 863564 в C++?
int result = 863564;
### Instruction: Как объявить переменную result со значением 863564 в C++? ### Response: int result = 863564;
65,061,744
kk
C++
logic_ops
advanced
C++ тилінде 2054 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2054 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2054; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
22,110,322
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; }
19,396,808
en
C++
logic_ops
advanced
Write logic to check if the year 1914 is a leap year in C++.
public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1914 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1914; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,390,074
ru
Python
var_decl
beginner
Как объявить переменную result со значением 641509 в Python?
result = 641509
### Instruction: Как объявить переменную result со значением 641509 в Python? ### Response: result = 641509
48,750,227
en
Unity
logic_ops
intermediate
Write a function that determines if the number 372 is prime in Unity.
public bool IsPrime() { int n = 372; 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 372 is prime in Unity. ### Response: public bool IsPrime() { int n = 372; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
40,467,808
kk
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; }
84,490,932
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; }
305,688
en
Java
var_decl
beginner
How to declare a variable value with value 505896 in Java?
int value = 505896;
### Instruction: How to declare a variable value with value 505896 in Java? ### Response: int value = 505896;
88,626,368
kk
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; }
39,635
en
Unity
sum_n
intermediate
Write a function in Unity that sums numbers from 1 to 8394.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8394)); }
### Instruction: Write a function in Unity that sums numbers from 1 to 8394. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(8394)); }
68,890,284
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 2074 високосным.
public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2074 високосным. ### Response: public bool IsLeap() { int y = 2074; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
31,166,131
en
JavaScript
string_ops
advanced
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
93,419,522
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
25,223,014
kk
Python
logic_ops
advanced
Python тилінде 262 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 262 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 262 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 262 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
640,824
en
Unity
var_decl
beginner
How to declare a variable x with value 626651 in Unity?
int x = 626651;
### Instruction: How to declare a variable x with value 626651 in Unity? ### Response: int x = 626651;
17,056,018
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
70,411,898
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();
3,154,097
en
C#
var_decl
beginner
How to declare a variable amount with value 985327 in C#?
int amount = 985327;
### Instruction: How to declare a variable amount with value 985327 in C#? ### Response: int amount = 985327;
1,201,288
kk
Python
var_decl
beginner
Python тілінде 570125 мәнімен value айнымалысын қалай жариялауға болады?
value = 570125
### Instruction: Python тілінде 570125 мәнімен value айнымалысын қалай жариялауға болады? ### Response: value = 570125
55,783,314
kk
Python
string_ops
advanced
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
583,919
en
Java
var_decl
beginner
How to declare a variable value with value 774327 in Java?
int value = 774327;
### Instruction: How to declare a variable value with value 774327 in Java? ### Response: int value = 774327;
50,055,607
kk
C++
logic_ops
intermediate
C++ тилінде 203 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 203; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 203 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 203; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,317,404
ru
C++
var_decl
beginner
Как объявить переменную level со значением 273112 в C++?
int level = 273112;
### Instruction: Как объявить переменную level со значением 273112 в C++? ### Response: int level = 273112;
98,311
kk
Java
sum_n
intermediate
Java тілінде 1-ден 3903-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3903));
### Instruction: Java тілінде 1-ден 3903-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(3903));
4,935,677
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 506781 в JavaScript?
let score = 506781;
### Instruction: Как объявить переменную score со значением 506781 в JavaScript? ### Response: let score = 506781;
82,901,824
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; }
2,544,167
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 845166 в Python?
rate = 845166
### Instruction: Как объявить переменную rate со значением 845166 в Python? ### Response: rate = 845166
66,046,240
en
Python
string_ops
intermediate
Write a function that converts a string to uppercase in Python.
def to_upper(s): return s.upper()
### Instruction: Write a function that converts a string to uppercase in Python. ### Response: def to_upper(s): return s.upper()
95,295,542
ru
C++
array_ops
intermediate
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,426,466
kk
Java
var_decl
beginner
Java тілінде 213841 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 213841;
### Instruction: Java тілінде 213841 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 213841;
86,264,930
kk
C#
logic_ops
intermediate
C# тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 300 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 300; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
61,433,662
ru
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; }
4,491,098
ru
Python
var_decl
beginner
Как объявить переменную weight со значением 641610 в Python?
weight = 641610
### Instruction: Как объявить переменную weight со значением 641610 в Python? ### Response: weight = 641610
3,927,938
en
Python
var_decl
beginner
How to declare a variable offset with value 914165 in Python?
offset = 914165
### Instruction: How to declare a variable offset with value 914165 in Python? ### Response: offset = 914165
86,369,635
en
Unity
logic_ops
intermediate
Write logic to check if the year 2036 is a leap year in Unity.
public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2036 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2036; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
58,739,747
kk
C++
logic_ops
intermediate
C++ тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 2056 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2056; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,286,938
en
JavaScript
var_decl
beginner
How to declare a variable level with value 69482 in JavaScript?
let level = 69482;
### Instruction: How to declare a variable level with value 69482 in JavaScript? ### Response: let level = 69482;
87,639,538
kk
C++
logic_ops
intermediate
C++ тилінде 1970 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 1970; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C++ тилінде 1970 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 1970; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
32,251,222
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аеёиоуыэюя')
77,002,813
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(); }
629,483
ru
Unity
var_decl
beginner
Как объявить переменную total со значением 143631 в Unity?
int total = 143631;
### Instruction: Как объявить переменную total со значением 143631 в Unity? ### Response: int total = 143631;
97,679,712
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]
80,220,122
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; }
95,257,387
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
4,625,723
kk
JavaScript
var_decl
beginner
JavaScript тілінде 904053 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 904053;
### Instruction: JavaScript тілінде 904053 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 904053;
41,060,420
en
JavaScript
string_ops
intermediate
Write a function that counts vowels in a text in JavaScript.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: Write a function that counts vowels in a text in JavaScript. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
180,426
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 5762.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5762))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 5762. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(5762))
67,977,439
ru
Python
logic_ops
advanced
Напишите на Python логику проверки, является ли год 1993 високосным.
def is_leap(): year = 1993 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 1993 високосным. ### Response: def is_leap(): year = 1993 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
31,953,088
kk
C++
string_ops
advanced
C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C++ тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
18,909,474
en
Java
logic_ops
intermediate
Write a function that determines if the number 301 is prime in Java.
public bool IsPrime() { int n = 301; 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 301 is prime in Java. ### Response: public bool IsPrime() { int n = 301; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
86,807,847
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; }
37,802,549
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(); }
17,474,353
kk
JavaScript
string_ops
intermediate
JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
### Instruction: JavaScript тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: const countVowels = s => (s.match(/[aeiou]/gi) || []).length;
91,190,543
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; }
431,231
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 1466.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1466))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 1466. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(1466))
57,591,978
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 1915 високосным.
public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 1915 високосным. ### Response: public bool IsLeap() { int y = 1915; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
23,965,467
ru
Python
array_ops
advanced
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
272,995
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 3677.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3677) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 3677. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(3677) << std::endl;
16,479,880
ru
C#
logic_ops
advanced
Напишите на C# логику проверки, является ли год 1998 високосным.
public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1998 високосным. ### Response: public bool IsLeap() { int y = 1998; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
14,589,009
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
function isLeap() { let y = 1941; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: JavaScript тилінде 1941 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: function isLeap() { let y = 1941; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
43,745,952
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая переводит строку в верхний регистр.
const toUpper = s => s.toUpperCase();
### Instruction: Напишите на JavaScript функцию, которая переводит строку в верхний регистр. ### Response: const toUpper = s => s.toUpperCase();
92,200,371
en
C++
array_ops
advanced
Write a function that filters only even numbers from a list in C++.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in C++. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
55,982,731
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; }
51,192
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 7175.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7175));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 7175. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(7175));
4,914,742
en
C#
var_decl
beginner
How to declare a variable index with value 794896 in C#?
int index = 794896;
### Instruction: How to declare a variable index with value 794896 in C#? ### Response: int index = 794896;
10,393,825
kk
C#
string_ops
advanced
C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: C# тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
98,977,016
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 228 простым.
function isPrime() { let n = 228; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 228 простым. ### Response: function isPrime() { let n = 228; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
23,530,357
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; }
21,531,947
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; }
80,840,127
en
Java
logic_ops
advanced
Write logic to check if the year 1946 is a leap year in Java.
public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1946 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1946; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
44,187,548
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(); }
259,010
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9414.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9414));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9414. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9414));
71,516,772
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1924 високосным.
public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1924 високосным. ### Response: public bool IsLeap() { int y = 1924; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
55,154,490
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; }
3,462,716
kk
C#
var_decl
beginner
C# тілінде 139277 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 139277;
### Instruction: C# тілінде 139277 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 139277;
357,992
ru
C++
var_decl
beginner
Как объявить переменную y со значением 879062 в C++?
int y = 879062;
### Instruction: Как объявить переменную y со значением 879062 в C++? ### Response: int y = 879062;
96,168,337
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 385 простым.
public bool IsPrime() { int n = 385; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 385 простым. ### Response: public bool IsPrime() { int n = 385; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
80,476,304
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1919 високосным.
public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1919 високосным. ### Response: public bool IsLeap() { int y = 1919; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,927,778
ru
Unity
var_decl
beginner
Как объявить переменную amount со значением 929711 в Unity?
int amount = 929711;
### Instruction: Как объявить переменную amount со значением 929711 в Unity? ### Response: int amount = 929711;
3,569,326
ru
C++
var_decl
beginner
Как объявить переменную result со значением 557105 в C++?
int result = 557105;
### Instruction: Как объявить переменную result со значением 557105 в C++? ### Response: int result = 557105;
733,018
en
Python
var_decl
beginner
How to declare a variable speed with value 760513 in Python?
speed = 760513
### Instruction: How to declare a variable speed with value 760513 in Python? ### Response: speed = 760513
62,661,021
kk
Unity
logic_ops
advanced
Unity тилінде 2061 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2061; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Unity тилінде 2061 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2061; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
74,145,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); }
13,058,704
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');