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,734,965
ru
Java
var_decl
beginner
Как объявить переменную total со значением 192291 в Java?
int total = 192291;
### Instruction: Как объявить переменную total со значением 192291 в Java? ### Response: int total = 192291;
46,522,493
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); }
34,663,227
ru
C++
logic_ops
intermediate
Напишите на C++ логику проверки, является ли год 2049 високосным.
public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2049 високосным. ### Response: public bool IsLeap() { int y = 2049; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
46,449,380
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;
88,942,638
en
Unity
array_ops
advanced
Write a function that reverses a list in Unity.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Unity. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
1,096,772
kk
Java
var_decl
beginner
Java тілінде 26823 мәнімен x айнымалысын қалай жариялауға болады?
int x = 26823;
### Instruction: Java тілінде 26823 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 26823;
43,175,571
kk
Python
array_ops
intermediate
Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Python тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
26,558,287
kk
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; }
3,097,805
ru
Java
var_decl
beginner
Как объявить переменную health со значением 628745 в Java?
int health = 628745;
### Instruction: Как объявить переменную health со значением 628745 в Java? ### Response: int health = 628745;
23,942
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 3189.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3189));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 3189. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(3189));
11,484,609
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; }
16,308,859
ru
Unity
array_ops
advanced
Напишите на Unity функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Unity функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
282,460
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 2448.
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(2448) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 2448. ### 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(2448) << std::endl;
52,996,587
kk
C++
array_ops
advanced
C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: C++ тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
1,426,456
en
JavaScript
var_decl
beginner
How to declare a variable result with value 460154 in JavaScript?
let result = 460154;
### Instruction: How to declare a variable result with value 460154 in JavaScript? ### Response: let result = 460154;
4,216,498
kk
Python
var_decl
beginner
Python тілінде 6808 мәнімен health айнымалысын қалай жариялауға болады?
health = 6808
### Instruction: Python тілінде 6808 мәнімен health айнымалысын қалай жариялауға болады? ### Response: health = 6808
1,754,368
en
C#
var_decl
beginner
How to declare a variable offset with value 628197 in C#?
int offset = 628197;
### Instruction: How to declare a variable offset with value 628197 in C#? ### Response: int offset = 628197;
1,392,022
ru
C++
var_decl
beginner
Как объявить переменную result со значением 965576 в C++?
int result = 965576;
### Instruction: Как объявить переменную result со значением 965576 в C++? ### Response: int result = 965576;
18,798,952
en
JavaScript
array_ops
intermediate
Write a function that finds the maximum number in an array in JavaScript.
const getMax = arr => Math.max(...arr);
### Instruction: Write a function that finds the maximum number in an array in JavaScript. ### Response: const getMax = arr => Math.max(...arr);
1,993,351
kk
Python
var_decl
beginner
Python тілінде 996906 мәнімен index айнымалысын қалай жариялауға болады?
index = 996906
### Instruction: Python тілінде 996906 мәнімен index айнымалысын қалай жариялауға болады? ### Response: index = 996906
679,965
ru
JavaScript
var_decl
beginner
Как объявить переменную size со значением 115890 в JavaScript?
let size = 115890;
### Instruction: Как объявить переменную size со значением 115890 в JavaScript? ### Response: let size = 115890;
21,672,950
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на Unity функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
90,031,006
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()
280,404
en
JavaScript
factorial
advanced
Write a function in JavaScript that calculates the factorial of 9761.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9761));
### Instruction: Write a function in JavaScript that calculates the factorial of 9761. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(9761));
251,311
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8138.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8138));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8138. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8138));
27,280,255
kk
Java
logic_ops
advanced
Java тилінде 199 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 199 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 199; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
93,215,964
en
Python
string_ops
advanced
Write a function that checks if a string is a palindrome in Python.
def is_palindrome(s): return s == s[::-1]
### Instruction: Write a function that checks if a string is a palindrome in Python. ### Response: def is_palindrome(s): return s == s[::-1]
78,747,256
ru
C#
string_ops
advanced
Напишите на C# функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C# функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
1,861,064
ru
C#
var_decl
beginner
Как объявить переменную level со значением 755912 в C#?
int level = 755912;
### Instruction: Как объявить переменную level со значением 755912 в C#? ### Response: int level = 755912;
3,788,286
ru
Python
var_decl
beginner
Как объявить переменную limit со значением 506026 в Python?
limit = 506026
### Instruction: Как объявить переменную limit со значением 506026 в Python? ### Response: limit = 506026
3,319,488
ru
C#
var_decl
beginner
Как объявить переменную speed со значением 973095 в C#?
int speed = 973095;
### Instruction: Как объявить переменную speed со значением 973095 в C#? ### Response: int speed = 973095;
98,310,609
kk
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; }
3,015,991
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 170407 в Unity?
int health = 170407;
### Instruction: Как объявить переменную health со значением 170407 в Unity? ### Response: int health = 170407;
65,550,493
kk
JavaScript
array_ops
intermediate
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();
4,107,620
kk
C++
var_decl
beginner
C++ тілінде 908427 мәнімен size айнымалысын қалай жариялауға болады?
int size = 908427;
### Instruction: C++ тілінде 908427 мәнімен size айнымалысын қалай жариялауға болады? ### Response: int size = 908427;
18,345,166
ru
C++
logic_ops
advanced
Напишите на 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); }
19,425,921
en
Unity
logic_ops
advanced
Write logic to check if the year 2016 is a leap year in Unity.
public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2016 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2016; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
703,060
kk
Python
factorial
advanced
Python тілінде 7441 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7441))
### Instruction: Python тілінде 7441 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(7441))
1,603,617
en
JavaScript
var_decl
beginner
How to declare a variable offset with value 970231 in JavaScript?
let offset = 970231;
### Instruction: How to declare a variable offset with value 970231 in JavaScript? ### Response: let offset = 970231;
57,884,830
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 443 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 443; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 443 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 443; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
1,486,839
ru
Python
var_decl
beginner
Как объявить переменную buffer со значением 815300 в Python?
buffer = 815300
### Instruction: Как объявить переменную buffer со значением 815300 в Python? ### Response: buffer = 815300
4,169,647
kk
JavaScript
var_decl
beginner
JavaScript тілінде 568850 мәнімен rate айнымалысын қалай жариялауға болады?
let rate = 568850;
### Instruction: JavaScript тілінде 568850 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: let rate = 568850;
2,069,425
en
Java
var_decl
beginner
How to declare a variable speed with value 557356 in Java?
int speed = 557356;
### Instruction: How to declare a variable speed with value 557356 in Java? ### Response: int speed = 557356;
3,808,143
en
C++
var_decl
beginner
How to declare a variable total with value 914681 in C++?
int total = 914681;
### Instruction: How to declare a variable total with value 914681 in C++? ### Response: int total = 914681;
20,521,921
kk
C++
logic_ops
intermediate
C++ тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 451 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 451; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,767,822
kk
C++
var_decl
beginner
C++ тілінде 275055 мәнімен weight айнымалысын қалай жариялауға болады?
int weight = 275055;
### Instruction: C++ тілінде 275055 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: int weight = 275055;
90,896,371
ru
C#
string_ops
advanced
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
3,896,977
ru
C#
var_decl
beginner
Как объявить переменную score со значением 241566 в C#?
int score = 241566;
### Instruction: Как объявить переменную score со значением 241566 в C#? ### Response: int score = 241566;
1,430,970
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 5397.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5397));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 5397. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(5397));
18,300,653
kk
Python
logic_ops
advanced
Python тилінде 372 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 372 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 372 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
3,449,549
kk
C++
var_decl
beginner
C++ тілінде 147821 мәнімен x айнымалысын қалай жариялауға болады?
int x = 147821;
### Instruction: C++ тілінде 147821 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 147821;
42,184,925
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 82 простым.
def is_prime(): n = 82 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 82 простым. ### Response: def is_prime(): n = 82 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
31,764,080
en
Python
string_ops
advanced
Write a function that counts vowels in a text in Python.
def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
### Instruction: Write a function that counts vowels in a text in Python. ### Response: def count_vowels(s): return sum(1 for c in s if c in 'aeiouAEIOUаеёиоуыэюя')
299,282
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 934.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(934));
### Instruction: Write a function in Java that sums numbers from 1 to 934. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(934));
98,398,026
kk
JavaScript
array_ops
intermediate
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
80,946,449
ru
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; }
37,338,899
ru
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; }
87,029,065
en
C++
logic_ops
advanced
Write a function that determines if the number 470 is prime in C++.
public bool IsPrime() { int n = 470; 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 470 is prime in C++. ### Response: public bool IsPrime() { int n = 470; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
353,066
en
Python
sum_n
intermediate
Write a function in Python that sums numbers from 1 to 2407.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2407))
### Instruction: Write a function in Python that sums numbers from 1 to 2407. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(2407))
2,063,165
kk
Python
var_decl
beginner
Python тілінде 532193 мәнімен score айнымалысын қалай жариялауға болады?
score = 532193
### Instruction: Python тілінде 532193 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 532193
51,920,387
kk
JavaScript
logic_ops
intermediate
JavaScript тилінде 409 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 409; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 409 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 409; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
17,317,033
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аеёиоуыэюя')
11,622,683
kk
Java
logic_ops
advanced
Java тилінде 77 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 77 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 77; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,417,938
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; }
53,146,925
en
C++
logic_ops
intermediate
Write logic to check if the year 1985 is a leap year in C++.
public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1985 is a leap year in C++. ### Response: public bool IsLeap() { int y = 1985; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,678,404
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 384236 в Unity?
int size = 384236;
### Instruction: Как объявить переменную size со значением 384236 в Unity? ### Response: int size = 384236;
11,963,625
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; }
3,591,748
ru
C#
var_decl
beginner
Как объявить переменную total со значением 253532 в C#?
int total = 253532;
### Instruction: Как объявить переменную total со значением 253532 в C#? ### Response: int total = 253532;
92,939,102
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 14 простым.
function isPrime() { let n = 14; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 14 простым. ### Response: function isPrime() { let n = 14; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
38,041,172
kk
Java
string_ops
advanced
Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Java тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
85,025
kk
Python
factorial
advanced
Python тілінде 4285 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4285))
### Instruction: Python тілінде 4285 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(4285))
19,193,688
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); }
4,010,320
en
Python
var_decl
beginner
How to declare a variable buffer with value 392459 in Python?
buffer = 392459
### Instruction: How to declare a variable buffer with value 392459 in Python? ### Response: buffer = 392459
57,124,180
ru
JavaScript
string_ops
advanced
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
75,058,564
en
C++
logic_ops
intermediate
Write a function that determines if the number 119 is prime in C++.
public bool IsPrime() { int n = 119; 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 119 is prime in C++. ### Response: public bool IsPrime() { int n = 119; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
2,196,154
en
C#
var_decl
beginner
How to declare a variable amount with value 316617 in C#?
int amount = 316617;
### Instruction: How to declare a variable amount with value 316617 in C#? ### Response: int amount = 316617;
97,134,557
kk
Python
logic_ops
intermediate
Python тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 57 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 57 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 57 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
89,496,958
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
77,972,226
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; }
2,951,649
kk
C#
var_decl
beginner
C# тілінде 792277 мәнімен data айнымалысын қалай жариялауға болады?
int data = 792277;
### Instruction: C# тілінде 792277 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 792277;
17,657,692
kk
Java
logic_ops
advanced
Java тилінде 363 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 363 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 363; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
10,325,905
ru
JavaScript
logic_ops
intermediate
Напишите на JavaScript функцию, определяющую, является ли число 314 простым.
function isPrime() { let n = 314; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 314 простым. ### Response: function isPrime() { let n = 314; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
992,787
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 8468.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8468));
### Instruction: Write a function in C# that calculates the factorial of 8468. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(8468));
25,192,159
ru
Unity
logic_ops
advanced
Напишите на Unity функцию, определяющую, является ли число 80 простым.
public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 80 простым. ### Response: public bool IsPrime() { int n = 80; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
312,690
ru
Python
sum_n
intermediate
Напиши функцию на Python, которая считает сумму чисел от 1 до 8677.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8677))
### Instruction: Напиши функцию на Python, которая считает сумму чисел от 1 до 8677. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(8677))
53,628,065
en
Python
logic_ops
intermediate
Write logic to check if the year 2008 is a leap year in Python.
def is_leap(): year = 2008 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2008 is a leap year in Python. ### Response: def is_leap(): year = 2008 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
76,608,448
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; }
1,266,997
ru
Java
var_decl
beginner
Как объявить переменную score со значением 37114 в Java?
int score = 37114;
### Instruction: Как объявить переменную score со значением 37114 в Java? ### Response: int score = 37114;
528,959
kk
Unity
factorial
advanced
Unity тілінде 4464 санының факториалын есептейтін функция жаз.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4464)); }
### Instruction: Unity тілінде 4464 санының факториалын есептейтін функция жаз. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(4464)); }
43,628,740
kk
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; }
25,273,795
en
Java
string_ops
advanced
Write a function that counts vowels in a text in Java.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Java. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
28,142,047
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; }
42,004,257
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(); }
4,511,813
ru
C++
var_decl
beginner
Как объявить переменную index со значением 252815 в C++?
int index = 252815;
### Instruction: Как объявить переменную index со значением 252815 в C++? ### Response: int index = 252815;
189,527
kk
Java
var_decl
beginner
Java тілінде 194357 мәнімен limit айнымалысын қалай жариялауға болады?
int limit = 194357;
### Instruction: Java тілінде 194357 мәнімен limit айнымалысын қалай жариялауға болады? ### Response: int limit = 194357;
15,771,871
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; }
4,465,349
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 788097 в Java?
int timer = 788097;
### Instruction: Как объявить переменную timer со значением 788097 в Java? ### Response: int timer = 788097;
91,759,025
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; }
34,527,326
ru
Unity
array_ops
intermediate
Напишите на Unity функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на Unity функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
21,583,820
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
const reverseArr = arr => arr.reverse();
### Instruction: JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: const reverseArr = arr => arr.reverse();