id
int64
language
string
prog_lang
string
category
string
difficulty
string
instruction
string
output
string
text
string
4,131,831
en
Unity
var_decl
beginner
How to declare a variable data with value 895043 in Unity?
int data = 895043;
### Instruction: How to declare a variable data with value 895043 in Unity? ### Response: int data = 895043;
3,839,911
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 768035 в JavaScript?
let score = 768035;
### Instruction: Как объявить переменную score со значением 768035 в JavaScript? ### Response: let score = 768035;
1,943,500
en
Python
var_decl
beginner
How to declare a variable level with value 347719 in Python?
level = 347719
### Instruction: How to declare a variable level with value 347719 in Python? ### Response: level = 347719
61,444,223
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; }
84,194,961
ru
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аеёиоуыэюя')
4,128,771
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 999456 в Unity?
int speed = 999456;
### Instruction: Как объявить переменную speed со значением 999456 в Unity? ### Response: int speed = 999456;
27,129,066
kk
Unity
string_ops
intermediate
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
4,710,874
en
Java
var_decl
beginner
How to declare a variable weight with value 153555 in Java?
int weight = 153555;
### Instruction: How to declare a variable weight with value 153555 in Java? ### Response: int weight = 153555;
3,092,539
en
C++
var_decl
beginner
How to declare a variable offset with value 722528 in C++?
int offset = 722528;
### Instruction: How to declare a variable offset with value 722528 in C++? ### Response: int offset = 722528;
45,614,429
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2014 високосным.
public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2014 високосным. ### Response: public bool IsLeap() { int y = 2014; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
2,524,826
ru
C#
var_decl
beginner
Как объявить переменную data со значением 357472 в C#?
int data = 357472;
### Instruction: Как объявить переменную data со значением 357472 в C#? ### Response: int data = 357472;
88,151,234
ru
C#
logic_ops
advanced
Напишите на C# функцию, определяющую, является ли число 62 простым.
public bool IsPrime() { int n = 62; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C# функцию, определяющую, является ли число 62 простым. ### Response: public bool IsPrime() { int n = 62; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,296,615
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; }
65,498,874
ru
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аеёиоуыэюя')
1,215,775
kk
Java
var_decl
beginner
Java тілінде 195875 мәнімен score айнымалысын қалай жариялауға болады?
int score = 195875;
### Instruction: Java тілінде 195875 мәнімен score айнымалысын қалай жариялауға болады? ### Response: int score = 195875;
573,429
en
Unity
factorial
advanced
Write a function in Unity that calculates the factorial of 7440.
long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7440)); }
### Instruction: Write a function in Unity that calculates the factorial of 7440. ### Response: long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } void Start() { Debug.Log(Factorial(7440)); }
75,763,233
ru
Java
logic_ops
intermediate
Напишите на Java функцию, определяющую, является ли число 8 простым.
public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Java функцию, определяющую, является ли число 8 простым. ### Response: public bool IsPrime() { int n = 8; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,346,448
en
Python
var_decl
beginner
How to declare a variable result with value 623718 in Python?
result = 623718
### Instruction: How to declare a variable result with value 623718 in Python? ### Response: result = 623718
441,674
kk
Java
sum_n
intermediate
Java тілінде 1-ден 5427-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5427));
### Instruction: Java тілінде 1-ден 5427-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(5427));
4,712,154
ru
C++
var_decl
beginner
Как объявить переменную x со значением 249848 в C++?
int x = 249848;
### Instruction: Как объявить переменную x со значением 249848 в C++? ### Response: int x = 249848;
82,537,297
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; }
95,983,766
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; }
4,472,745
en
Java
var_decl
beginner
How to declare a variable rate with value 60095 in Java?
int rate = 60095;
### Instruction: How to declare a variable rate with value 60095 in Java? ### Response: int rate = 60095;
49,778
ru
C++
sum_n
intermediate
Напиши функцию на C++, которая считает сумму чисел от 1 до 6167.
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(6167) << std::endl;
### Instruction: Напиши функцию на C++, которая считает сумму чисел от 1 до 6167. ### 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(6167) << std::endl;
34,357,052
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; }
4,493,670
en
Unity
var_decl
beginner
How to declare a variable offset with value 795732 in Unity?
int offset = 795732;
### Instruction: How to declare a variable offset with value 795732 in Unity? ### Response: int offset = 795732;
81,985,721
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2023 високосным.
public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2023 високосным. ### Response: public bool IsLeap() { int y = 2023; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
1,061,762
en
Unity
var_decl
beginner
How to declare a variable size with value 209349 in Unity?
int size = 209349;
### Instruction: How to declare a variable size with value 209349 in Unity? ### Response: int size = 209349;
4,013,571
kk
Unity
var_decl
beginner
Unity тілінде 714941 мәнімен rate айнымалысын қалай жариялауға болады?
int rate = 714941;
### Instruction: Unity тілінде 714941 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: int rate = 714941;
20,511,752
ru
Python
logic_ops
intermediate
Напишите на Python логику проверки, является ли год 2030 високосным.
def is_leap(): year = 2030 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Напишите на Python логику проверки, является ли год 2030 високосным. ### Response: def is_leap(): year = 2030 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,711,360
en
Java
var_decl
beginner
How to declare a variable buffer with value 763850 in Java?
int buffer = 763850;
### Instruction: How to declare a variable buffer with value 763850 in Java? ### Response: int buffer = 763850;
63,804,465
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 2088 високосным.
public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2088 високосным. ### Response: public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
98,456,050
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; }
667,718
kk
C#
var_decl
beginner
C# тілінде 375269 мәнімен data айнымалысын қалай жариялауға болады?
int data = 375269;
### Instruction: C# тілінде 375269 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 375269;
4,710,067
ru
C++
var_decl
beginner
Как объявить переменную count со значением 934079 в C++?
int count = 934079;
### Instruction: Как объявить переменную count со значением 934079 в C++? ### Response: int count = 934079;
18,243,849
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; }
73,425,873
en
Python
array_ops
advanced
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
41,906,174
kk
C#
logic_ops
advanced
C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 127 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,969,496
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; }
24,680,149
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 213 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 213; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 213 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 213; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
65,558,183
en
Java
array_ops
intermediate
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; }
5,807
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 289.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(289) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 289. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(289) << std::endl;
2,443,456
ru
C++
var_decl
beginner
Как объявить переменную health со значением 524704 в C++?
int health = 524704;
### Instruction: Как объявить переменную health со значением 524704 в C++? ### Response: int health = 524704;
67,115,338
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 2057 високосным.
public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 2057 високосным. ### Response: public bool IsLeap() { int y = 2057; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
96,500,044
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); }
72,069,340
en
Python
logic_ops
advanced
Write a function that determines if the number 432 is prime in Python.
def is_prime(): n = 432 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Write a function that determines if the number 432 is prime in Python. ### Response: def is_prime(): n = 432 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
43,448,429
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]
223,079
ru
Java
factorial
advanced
Напиши функцию на Java, которая вычисляет факториал числа 4872.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4872));
### Instruction: Напиши функцию на Java, которая вычисляет факториал числа 4872. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(4872));
923,407
kk
Python
var_decl
beginner
Python тілінде 429074 мәнімен result айнымалысын қалай жариялауға болады?
result = 429074
### Instruction: Python тілінде 429074 мәнімен result айнымалысын қалай жариялауға болады? ### Response: result = 429074
34,275,347
kk
Unity
string_ops
advanced
Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Unity тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
19,066,491
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);
79,851,807
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(); }
54,053,106
kk
JavaScript
array_ops
advanced
JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
const filterEven = arr => arr.filter(x => x % 2 === 0);
### Instruction: JavaScript тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: const filterEven = arr => arr.filter(x => x % 2 === 0);
1,097,541
kk
C#
var_decl
beginner
C# тілінде 648350 мәнімен index айнымалысын қалай жариялауға болады?
int index = 648350;
### Instruction: C# тілінде 648350 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 648350;
44,302,720
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,659,970
ru
Python
var_decl
beginner
Как объявить переменную value со значением 227149 в Python?
value = 227149
### Instruction: Как объявить переменную value со значением 227149 в Python? ### Response: value = 227149
67,603,531
ru
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; }
2,014,877
en
JavaScript
var_decl
beginner
How to declare a variable rate with value 850136 in JavaScript?
let rate = 850136;
### Instruction: How to declare a variable rate with value 850136 in JavaScript? ### Response: let rate = 850136;
4,787,427
kk
Python
var_decl
beginner
Python тілінде 467542 мәнімен rate айнымалысын қалай жариялауға болады?
rate = 467542
### Instruction: Python тілінде 467542 мәнімен rate айнымалысын қалай жариялауға болады? ### Response: rate = 467542
98,499,122
en
Python
array_ops
intermediate
Write a function that reverses a list in Python.
def reverse_list(arr): return arr[::-1]
### Instruction: Write a function that reverses a list in Python. ### Response: def reverse_list(arr): return arr[::-1]
66,328,015
kk
JavaScript
logic_ops
advanced
JavaScript тилінде 202 санының жай сан екенін анықтайтын функцияны жазыңыз.
function isPrime() { let n = 202; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: JavaScript тилінде 202 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: function isPrime() { let n = 202; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
4,248,529
en
C++
var_decl
beginner
How to declare a variable x with value 566848 in C++?
int x = 566848;
### Instruction: How to declare a variable x with value 566848 in C++? ### Response: int x = 566848;
32,710,070
kk
JavaScript
string_ops
intermediate
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
const toUpper = s => s.toUpperCase();
### Instruction: JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: const toUpper = s => s.toUpperCase();
74,826,786
en
C#
logic_ops
intermediate
Write logic to check if the year 2088 is a leap year in C#.
public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2088 is a leap year in C#. ### Response: public bool IsLeap() { int y = 2088; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,634,420
kk
Unity
var_decl
beginner
Unity тілінде 956209 мәнімен index айнымалысын қалай жариялауға болады?
int index = 956209;
### Instruction: Unity тілінде 956209 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 956209;
51,231,478
kk
Python
string_ops
advanced
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
21,869,190
ru
Python
string_ops
intermediate
Напишите на Python функцию, которая переводит строку в верхний регистр.
def to_upper(s): return s.upper()
### Instruction: Напишите на Python функцию, которая переводит строку в верхний регистр. ### Response: def to_upper(s): return s.upper()
4,882,437
en
Java
var_decl
beginner
How to declare a variable weight with value 248236 in Java?
int weight = 248236;
### Instruction: How to declare a variable weight with value 248236 in Java? ### Response: int weight = 248236;
93,132,164
kk
Python
logic_ops
intermediate
Python тилінде 227 санының жай сан екенін анықтайтын функцияны жазыңыз.
def is_prime(): n = 227 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Python тилінде 227 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: def is_prime(): n = 227 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
328,575
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 9358.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9358));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 9358. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9358));
3,400,720
ru
C#
var_decl
beginner
Как объявить переменную limit со значением 798695 в C#?
int limit = 798695;
### Instruction: Как объявить переменную limit со значением 798695 в C#? ### Response: int limit = 798695;
67,495,142
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; }
942,461
kk
JavaScript
var_decl
beginner
JavaScript тілінде 185472 мәнімен index айнымалысын қалай жариялауға болады?
let index = 185472;
### Instruction: JavaScript тілінде 185472 мәнімен index айнымалысын қалай жариялауға болады? ### Response: let index = 185472;
3,533,896
ru
JavaScript
var_decl
beginner
Как объявить переменную x со значением 957534 в JavaScript?
let x = 957534;
### Instruction: Как объявить переменную x со значением 957534 в JavaScript? ### Response: let x = 957534;
75,779,387
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(); }
1,697,138
ru
Java
var_decl
beginner
Как объявить переменную index со значением 746869 в Java?
int index = 746869;
### Instruction: Как объявить переменную index со значением 746869 в Java? ### Response: int index = 746869;
70,739,226
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 337 is prime in JavaScript.
function isPrime() { let n = 337; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Write a function that determines if the number 337 is prime in JavaScript. ### Response: function isPrime() { let n = 337; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
432,042
en
Java
sum_n
intermediate
Write a function in Java that sums numbers from 1 to 4610.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4610));
### Instruction: Write a function in Java that sums numbers from 1 to 4610. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(4610));
31,801,380
en
C#
string_ops
intermediate
Write a function that checks if a string is a palindrome in C#.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in C#. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
93,754,676
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; }
1,585,903
ru
Unity
var_decl
beginner
Как объявить переменную speed со значением 26560 в Unity?
int speed = 26560;
### Instruction: Как объявить переменную speed со значением 26560 в Unity? ### Response: int speed = 26560;
90,083,563
ru
Python
array_ops
advanced
Напишите на 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]
1,458,473
kk
JavaScript
var_decl
beginner
JavaScript тілінде 525639 мәнімен buffer айнымалысын қалай жариялауға болады?
let buffer = 525639;
### Instruction: JavaScript тілінде 525639 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: let buffer = 525639;
58,236,625
kk
Unity
string_ops
advanced
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
116,181
en
C++
factorial
advanced
Write a function in C++ that calculates the factorial of 2753.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2753) << std::endl;
### Instruction: Write a function in C++ that calculates the factorial of 2753. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(2753) << std::endl;
65,855,557
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; }
18,236,312
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; }
94,235,655
en
Python
array_ops
advanced
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
254,986
ru
C++
var_decl
beginner
Как объявить переменную total со значением 828140 в C++?
int total = 828140;
### Instruction: Как объявить переменную total со значением 828140 в C++? ### Response: int total = 828140;
74,633,390
en
Unity
logic_ops
advanced
Write a function that determines if the number 127 is prime in Unity.
public bool IsPrime() { int n = 127; 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 127 is prime in Unity. ### Response: public bool IsPrime() { int n = 127; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
49,367,576
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(); }
43,468,175
kk
C#
string_ops
advanced
C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: C# тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
57,584,122
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(); }
3,090,657
kk
C++
var_decl
beginner
C++ тілінде 216195 мәнімен result айнымалысын қалай жариялауға болады?
int result = 216195;
### Instruction: C++ тілінде 216195 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 216195;
4,368,408
en
JavaScript
var_decl
beginner
How to declare a variable amount with value 996240 in JavaScript?
let amount = 996240;
### Instruction: How to declare a variable amount with value 996240 in JavaScript? ### Response: let amount = 996240;
1,178,124
kk
JavaScript
var_decl
beginner
JavaScript тілінде 376448 мәнімен amount айнымалысын қалай жариялауға болады?
let amount = 376448;
### Instruction: JavaScript тілінде 376448 мәнімен amount айнымалысын қалай жариялауға болады? ### Response: let amount = 376448;
70,968,009
kk
Unity
array_ops
advanced
Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Unity тилінде тізімнен тек жұп сандарды сүзетін функцияны жазыңыз. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
3,021,897
ru
JavaScript
var_decl
beginner
Как объявить переменную y со значением 687600 в JavaScript?
let y = 687600;
### Instruction: Как объявить переменную y со значением 687600 в JavaScript? ### Response: let y = 687600;
384,278
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 4513.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4513));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 4513. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4513));
2,244,438
en
JavaScript
var_decl
beginner
How to declare a variable y with value 162122 in JavaScript?
let y = 162122;
### Instruction: How to declare a variable y with value 162122 in JavaScript? ### Response: let y = 162122;