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
4,048,676
ru
Java
var_decl
beginner
Как объявить переменную timer со значением 419786 в Java?
int timer = 419786;
### Instruction: Как объявить переменную timer со значением 419786 в Java? ### Response: int timer = 419786;
31,177,910
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;
27,030,077
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(); }
2,584,623
kk
JavaScript
var_decl
beginner
JavaScript тілінде 972918 мәнімен weight айнымалысын қалай жариялауға болады?
let weight = 972918;
### Instruction: JavaScript тілінде 972918 мәнімен weight айнымалысын қалай жариялауға болады? ### Response: let weight = 972918;
78,075,785
en
Unity
logic_ops
intermediate
Write logic to check if the year 2048 is a leap year in Unity.
public bool IsLeap() { int y = 2048; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2048 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 2048; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
65,328,960
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
79,956,338
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 374 простым.
public bool IsPrime() { int n = 374; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 374 простым. ### Response: public bool IsPrime() { int n = 374; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,904,240
kk
Python
var_decl
beginner
Python тілінде 780462 мәнімен score айнымалысын қалай жариялауға болады?
score = 780462
### Instruction: Python тілінде 780462 мәнімен score айнымалысын қалай жариялауға болады? ### Response: score = 780462
37,730,935
ru
Java
array_ops
advanced
Напишите на Java функцию, которая разворачивает список задом наперед.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Напишите на Java функцию, которая разворачивает список задом наперед. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
3,771,830
kk
C#
var_decl
beginner
C# тілінде 362394 мәнімен health айнымалысын қалай жариялауға болады?
int health = 362394;
### Instruction: C# тілінде 362394 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 362394;
58,448,183
en
Unity
string_ops
intermediate
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
25,472,780
en
C++
string_ops
intermediate
Write a function that converts a string to uppercase in C++.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Write a function that converts a string to uppercase in C++. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
72,452,545
kk
Python
array_ops
intermediate
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
def get_max(arr): return max(arr)
### Instruction: Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: def get_max(arr): return max(arr)
76,298,968
ru
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]
27,790,209
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]
99,338,464
en
Unity
logic_ops
intermediate
Write a function that determines if the number 354 is prime in Unity.
public bool IsPrime() { int n = 354; 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 354 is prime in Unity. ### Response: public bool IsPrime() { int n = 354; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,362,381
en
C++
var_decl
beginner
How to declare a variable total with value 947954 in C++?
int total = 947954;
### Instruction: How to declare a variable total with value 947954 in C++? ### Response: int total = 947954;
95,363,380
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(); }
88,819,878
ru
C#
logic_ops
intermediate
Напишите на C# логику проверки, является ли год 1906 високосным.
public bool IsLeap() { int y = 1906; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C# логику проверки, является ли год 1906 високосным. ### Response: public bool IsLeap() { int y = 1906; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
76,965,693
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая находит максимальное число в массиве.
def get_max(arr): return max(arr)
### Instruction: Напишите на Python функцию, которая находит максимальное число в массиве. ### Response: def get_max(arr): return max(arr)
43,941,258
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; }
39,146,088
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
4,986,568
ru
Python
var_decl
beginner
Как объявить переменную rate со значением 477877 в Python?
rate = 477877
### Instruction: Как объявить переменную rate со значением 477877 в Python? ### Response: rate = 477877
17,044,938
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()
2,515,986
en
Java
var_decl
beginner
How to declare a variable size with value 577451 in Java?
int size = 577451;
### Instruction: How to declare a variable size with value 577451 in Java? ### Response: int size = 577451;
33,460,642
en
Unity
logic_ops
advanced
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; }
600,877
kk
Python
factorial
advanced
Python тілінде 116 санының факториалын есептейтін функция жаз.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(116))
### Instruction: Python тілінде 116 санының факториалын есептейтін функция жаз. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(116))
73,261,278
en
Java
string_ops
intermediate
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; }
1,397,847
kk
Unity
var_decl
beginner
Unity тілінде 206050 мәнімен x айнымалысын қалай жариялауға болады?
int x = 206050;
### Instruction: Unity тілінде 206050 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 206050;
4,349,316
ru
C#
var_decl
beginner
Как объявить переменную level со значением 205140 в C#?
int level = 205140;
### Instruction: Как объявить переменную level со значением 205140 в C#? ### Response: int level = 205140;
4,703,108
kk
Java
var_decl
beginner
Java тілінде 642475 мәнімен count айнымалысын қалай жариялауға болады?
int count = 642475;
### Instruction: Java тілінде 642475 мәнімен count айнымалысын қалай жариялауға болады? ### Response: int count = 642475;
83,520,128
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; }
19,167,435
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
71,528,853
ru
C++
logic_ops
advanced
Напишите на C++ логику проверки, является ли год 2058 високосным.
public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на C++ логику проверки, является ли год 2058 високосным. ### Response: public bool IsLeap() { int y = 2058; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
25,212,553
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; }
3,171,029
ru
C++
var_decl
beginner
Как объявить переменную buffer со значением 161392 в C++?
int buffer = 161392;
### Instruction: Как объявить переменную buffer со значением 161392 в C++? ### Response: int buffer = 161392;
46,366,900
en
Unity
array_ops
intermediate
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; }
29,502,490
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 264 простым.
public bool IsPrime() { int n = 264; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 264 простым. ### Response: public bool IsPrime() { int n = 264; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
84,051,110
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; }
54,023,260
ru
Java
logic_ops
advanced
Напишите на Java логику проверки, является ли год 2077 високосным.
public bool IsLeap() { int y = 2077; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 2077 високосным. ### Response: public bool IsLeap() { int y = 2077; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
41,006,446
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; }
28,030,778
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 187 простым.
public bool IsPrime() { int n = 187; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 187 простым. ### Response: public bool IsPrime() { int n = 187; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
82,381,907
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
34,516,786
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1913 is a leap year in JavaScript.
function isLeap() { let y = 1913; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1913 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1913; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
50,192,870
kk
Python
string_ops
intermediate
Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
def is_palindrome(s): return s == s[::-1]
### Instruction: Python тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: def is_palindrome(s): return s == s[::-1]
22,917,255
en
Java
array_ops
intermediate
Write a function that reverses a list in Java.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in Java. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
47,207,453
en
Unity
logic_ops
intermediate
Write a function that determines if the number 74 is prime in Unity.
public bool IsPrime() { int n = 74; 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 74 is prime in Unity. ### Response: public bool IsPrime() { int n = 74; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
92,181,157
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; }
18,039,508
en
Python
string_ops
intermediate
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]
96,852,983
ru
Java
logic_ops
intermediate
Напишите на Java логику проверки, является ли год 1975 високосным.
public bool IsLeap() { int y = 1975; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Java логику проверки, является ли год 1975 високосным. ### Response: public bool IsLeap() { int y = 1975; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
282,448
ru
Unity
sum_n
intermediate
Напиши функцию на Unity, которая считает сумму чисел от 1 до 5891.
int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5891)); }
### Instruction: Напиши функцию на Unity, которая считает сумму чисел от 1 до 5891. ### Response: int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } void Start() { Debug.Log(SumToN(5891)); }
8,463
kk
JavaScript
factorial
advanced
JavaScript тілінде 5733 санының факториалын есептейтін функция жаз.
function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5733));
### Instruction: JavaScript тілінде 5733 санының факториалын есептейтін функция жаз. ### Response: function factorial(n) { return n <= 1 ? 1 : n * factorial(n - 1); } console.log(factorial(5733));
4,498,183
ru
Unity
var_decl
beginner
Как объявить переменную weight со значением 227270 в Unity?
int weight = 227270;
### Instruction: Как объявить переменную weight со значением 227270 в Unity? ### Response: int weight = 227270;
90,313,372
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; }
82,404,081
ru
Unity
string_ops
advanced
Напишите на Unity функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на Unity функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
83,700,910
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); }
98,598,089
kk
C++
logic_ops
advanced
C++ тилінде 175 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 175; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C++ тилінде 175 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 175; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
414,369
kk
Java
factorial
advanced
Java тілінде 6156 санының факториалын есептейтін функция жаз.
static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6156));
### Instruction: Java тілінде 6156 санының факториалын есептейтін функция жаз. ### Response: static long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } System.out.println(factorial(6156));
82,319,995
en
Python
array_ops
intermediate
Write a function that finds the maximum number in an array in Python.
def get_max(arr): return max(arr)
### Instruction: Write a function that finds the maximum number in an array in Python. ### Response: def get_max(arr): return max(arr)
3,189,802
ru
C#
var_decl
beginner
Как объявить переменную y со значением 63851 в C#?
int y = 63851;
### Instruction: Как объявить переменную y со значением 63851 в C#? ### Response: int y = 63851;
66,380,080
ru
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; }
165,441
ru
C++
factorial
advanced
Напиши функцию на C++, которая вычисляет факториал числа 8358.
long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8358) << std::endl;
### Instruction: Напиши функцию на C++, которая вычисляет факториал числа 8358. ### Response: long long factorial(int n) { return n <= 1 ? 1 : n * factorial(n - 1); } std::cout << factorial(8358) << std::endl;
77,930,643
kk
Java
logic_ops
intermediate
Java тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 166; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 166 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 166; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
731,398
kk
Python
var_decl
beginner
Python тілінде 223428 мәнімен timer айнымалысын қалай жариялауға болады?
timer = 223428
### Instruction: Python тілінде 223428 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: timer = 223428
302,424
en
JavaScript
sum_n
intermediate
Write a function in JavaScript that sums numbers from 1 to 4362.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4362));
### Instruction: Write a function in JavaScript that sums numbers from 1 to 4362. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(4362));
4,632,145
ru
Unity
var_decl
beginner
Как объявить переменную data со значением 24924 в Unity?
int data = 24924;
### Instruction: Как объявить переменную data со значением 24924 в Unity? ### Response: int data = 24924;
3,811,899
en
Java
var_decl
beginner
How to declare a variable score with value 178634 in Java?
int score = 178634;
### Instruction: How to declare a variable score with value 178634 in Java? ### Response: int score = 178634;
4,007,607
kk
C++
var_decl
beginner
C++ тілінде 751168 мәнімен result айнымалысын қалай жариялауға болады?
int result = 751168;
### Instruction: C++ тілінде 751168 мәнімен result айнымалысын қалай жариялауға болады? ### Response: int result = 751168;
283,951
kk
Java
var_decl
beginner
Java тілінде 517967 мәнімен y айнымалысын қалай жариялауға болады?
int y = 517967;
### Instruction: Java тілінде 517967 мәнімен y айнымалысын қалай жариялауға болады? ### Response: int y = 517967;
91,044,925
kk
Unity
logic_ops
intermediate
Unity тилінде 4 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 4 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 4; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
74,259,950
en
JavaScript
string_ops
advanced
Write a function that checks if a string is a palindrome in JavaScript.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Write a function that checks if a string is a palindrome in JavaScript. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
232,903
ru
C++
var_decl
beginner
Как объявить переменную offset со значением 464918 в C++?
int offset = 464918;
### Instruction: Как объявить переменную offset со значением 464918 в C++? ### Response: int offset = 464918;
671,911
kk
C#
sum_n
intermediate
C# тілінде 1-ден 6680-ге дейінгі сандардың қосындысын есептейтін функция жаз.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6680));
### Instruction: C# тілінде 1-ден 6680-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(6680));
192,990
kk
Python
sum_n
intermediate
Python тілінде 1-ден 7444-ге дейінгі сандардың қосындысын есептейтін функция жаз.
def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7444))
### Instruction: Python тілінде 1-ден 7444-ге дейінгі сандардың қосындысын есептейтін функция жаз. ### Response: def sum_to_n(n): return sum(range(1, n + 1)) print(sum_to_n(7444))
77,987,227
ru
Java
string_ops
advanced
Напишите на Java функцию, которая считает количество гласных букв в тексте.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Напишите на Java функцию, которая считает количество гласных букв в тексте. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
4,791,613
en
C++
var_decl
beginner
How to declare a variable rate with value 270350 in C++?
int rate = 270350;
### Instruction: How to declare a variable rate with value 270350 in C++? ### Response: int rate = 270350;
492,248
en
Python
var_decl
beginner
How to declare a variable level with value 538141 in Python?
level = 538141
### Instruction: How to declare a variable level with value 538141 in Python? ### Response: level = 538141
24,916,500
en
JavaScript
logic_ops
intermediate
Write a function that determines if the number 348 is prime in JavaScript.
function isPrime() { let n = 348; 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 348 is prime in JavaScript. ### Response: function isPrime() { let n = 348; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
91,675,909
en
C#
array_ops
advanced
Write a function that finds the maximum number in an array in C#.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Write a function that finds the maximum number in an array in C#. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
1,400,869
ru
C++
var_decl
beginner
Как объявить переменную result со значением 987962 в C++?
int result = 987962;
### Instruction: Как объявить переменную result со значением 987962 в C++? ### Response: int result = 987962;
65,949,222
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;
1,392,704
en
Python
var_decl
beginner
How to declare a variable limit with value 152934 in Python?
limit = 152934
### Instruction: How to declare a variable limit with value 152934 in Python? ### Response: limit = 152934
51,927,372
ru
JavaScript
string_ops
intermediate
Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: Напишите на JavaScript функцию, которая проверяет, является ли строка палиндромом. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
133,577
en
C#
factorial
advanced
Write a function in C# that calculates the factorial of 4763.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4763));
### Instruction: Write a function in C# that calculates the factorial of 4763. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(4763));
3,769,939
ru
Java
var_decl
beginner
Как объявить переменную value со значением 945798 в Java?
int value = 945798;
### Instruction: Как объявить переменную value со значением 945798 в Java? ### Response: int value = 945798;
3,577,711
kk
Unity
var_decl
beginner
Unity тілінде 23158 мәнімен index айнымалысын қалай жариялауға болады?
int index = 23158;
### Instruction: Unity тілінде 23158 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 23158;
117,566
ru
C#
sum_n
intermediate
Напиши функцию на C#, которая считает сумму чисел от 1 до 8000.
static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8000));
### Instruction: Напиши функцию на C#, которая считает сумму чисел от 1 до 8000. ### Response: static int SumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } Console.WriteLine(SumToN(8000));
3,925,388
kk
C++
var_decl
beginner
C++ тілінде 855327 мәнімен offset айнымалысын қалай жариялауға болады?
int offset = 855327;
### Instruction: C++ тілінде 855327 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: int offset = 855327;
92,852,335
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)
12,843,304
ru
C#
string_ops
intermediate
Напишите на C# функцию, которая переводит строку в верхний регистр.
public string ToUpper(string s) { return s.ToUpper(); }
### Instruction: Напишите на C# функцию, которая переводит строку в верхний регистр. ### Response: public string ToUpper(string s) { return s.ToUpper(); }
13,951,524
en
Python
string_ops
advanced
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()
97,018,624
en
Java
logic_ops
intermediate
Write logic to check if the year 1976 is a leap year in Java.
public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1976 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1976; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
84,141,748
en
Unity
array_ops
advanced
Write a function that filters only even numbers from a list in Unity.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Write a function that filters only even numbers from a list in Unity. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
4,726,204
ru
Python
var_decl
beginner
Как объявить переменную count со значением 813525 в Python?
count = 813525
### Instruction: Как объявить переменную count со значением 813525 в Python? ### Response: count = 813525
1,036,338
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 805201 in JavaScript?
let timer = 805201;
### Instruction: How to declare a variable timer with value 805201 in JavaScript? ### Response: let timer = 805201;
38,294,523
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 114 простым.
def is_prime(): n = 114 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 114 простым. ### Response: def is_prime(): n = 114 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
72,558,456
kk
Python
array_ops
advanced
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
86,826,016
ru
C#
array_ops
intermediate
Напишите на C# функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на C# функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
4,750,829
ru
JavaScript
var_decl
beginner
Как объявить переменную score со значением 933388 в JavaScript?
let score = 933388;
### Instruction: Как объявить переменную score со значением 933388 в JavaScript? ### Response: let score = 933388;
77,980,637
ru
Python
array_ops
intermediate
Напишите на Python функцию, которая разворачивает список задом наперед.
def reverse_list(arr): return arr[::-1]
### Instruction: Напишите на Python функцию, которая разворачивает список задом наперед. ### Response: def reverse_list(arr): return arr[::-1]