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
44,934,988
en
Python
logic_ops
intermediate
Write a function that determines if the number 6 is prime in Python.
def is_prime(): n = 6 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 6 is prime in Python. ### Response: def is_prime(): n = 6 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
13,880,100
ru
Java
array_ops
intermediate
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
39,644,097
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; }
40,744,431
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()
32,564,126
kk
C#
logic_ops
intermediate
C# тилінде 2029 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: C# тилінде 2029 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2029; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
46,056,133
ru
C++
string_ops
intermediate
Напишите на C++ функцию, которая проверяет, является ли строка палиндромом.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Напишите на C++ функцию, которая проверяет, является ли строка палиндромом. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
58,167,383
ru
JavaScript
array_ops
advanced
Напишите на JavaScript функцию, которая находит максимальное число в массиве.
const getMax = arr => Math.max(...arr);
### Instruction: Напишите на JavaScript функцию, которая находит максимальное число в массиве. ### Response: const getMax = arr => Math.max(...arr);
42,629,265
en
Python
logic_ops
advanced
Write logic to check if the year 2038 is a leap year in Python.
def is_leap(): year = 2038 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 2038 is a leap year in Python. ### Response: def is_leap(): year = 2038 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,760,608
ru
C++
var_decl
beginner
Как объявить переменную score со значением 614139 в C++?
int score = 614139;
### Instruction: Как объявить переменную score со значением 614139 в C++? ### Response: int score = 614139;
67,495,732
en
Java
logic_ops
advanced
Write a function that determines if the number 219 is prime in Java.
public bool IsPrime() { int n = 219; 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 219 is prime in Java. ### Response: public bool IsPrime() { int n = 219; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
4,893,382
ru
Unity
var_decl
beginner
Как объявить переменную health со значением 952890 в Unity?
int health = 952890;
### Instruction: Как объявить переменную health со значением 952890 в Unity? ### Response: int health = 952890;
11,281,371
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; }
13,947,076
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; }
85,465,976
ru
C++
logic_ops
intermediate
Напишите на C++ функцию, определяющую, является ли число 157 простым.
public bool IsPrime() { int n = 157; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 157 простым. ### Response: public bool IsPrime() { int n = 157; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
55,915,591
en
C++
array_ops
intermediate
Write a function that reverses a list in C++.
public void Reverse(int[] arr) { System.Array.Reverse(arr); }
### Instruction: Write a function that reverses a list in C++. ### Response: public void Reverse(int[] arr) { System.Array.Reverse(arr); }
70,338,411
en
Unity
logic_ops
intermediate
Write logic to check if the year 1935 is a leap year in Unity.
public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1935 is a leap year in Unity. ### Response: public bool IsLeap() { int y = 1935; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
3,347,174
ru
Unity
var_decl
beginner
Как объявить переменную size со значением 203111 в Unity?
int size = 203111;
### Instruction: Как объявить переменную size со значением 203111 в Unity? ### Response: int size = 203111;
48,322,478
kk
Python
array_ops
intermediate
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
def reverse_list(arr): return arr[::-1]
### Instruction: Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. ### Response: def reverse_list(arr): return arr[::-1]
97,988,419
kk
JavaScript
string_ops
advanced
JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз.
const isPalindrome = s => s === s.split('').reverse().join('');
### Instruction: JavaScript тилінде жолдың палиндром екенін тексеретін функцияны жазыңыз. ### Response: const isPalindrome = s => s === s.split('').reverse().join('');
2,717,242
en
JavaScript
var_decl
beginner
How to declare a variable timer with value 20588 in JavaScript?
let timer = 20588;
### Instruction: How to declare a variable timer with value 20588 in JavaScript? ### Response: let timer = 20588;
453,252
ru
Python
var_decl
beginner
Как объявить переменную total со значением 968846 в Python?
total = 968846
### Instruction: Как объявить переменную total со значением 968846 в Python? ### Response: total = 968846
26,534,716
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; }
195,166
kk
JavaScript
var_decl
beginner
JavaScript тілінде 864593 мәнімен count айнымалысын қалай жариялауға болады?
let count = 864593;
### Instruction: JavaScript тілінде 864593 мәнімен count айнымалысын қалай жариялауға болады? ### Response: let count = 864593;
82,371,904
ru
Unity
logic_ops
intermediate
Напишите на Unity функцию, определяющую, является ли число 314 простым.
public bool IsPrime() { int n = 314; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на Unity функцию, определяющую, является ли число 314 простым. ### Response: public bool IsPrime() { int n = 314; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
73,529,520
kk
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; }
11,478,065
en
Python
array_ops
advanced
Write a function that filters only even numbers from a list in Python.
def filter_even(arr): return [x for x in arr if x % 2 == 0]
### Instruction: Write a function that filters only even numbers from a list in Python. ### Response: def filter_even(arr): return [x for x in arr if x % 2 == 0]
2,011,303
en
Unity
var_decl
beginner
How to declare a variable size with value 317865 in Unity?
int size = 317865;
### Instruction: How to declare a variable size with value 317865 in Unity? ### Response: int size = 317865;
4,574,577
kk
Python
var_decl
beginner
Python тілінде 970799 мәнімен count айнымалысын қалай жариялауға болады?
count = 970799
### Instruction: Python тілінде 970799 мәнімен count айнымалысын қалай жариялауға болады? ### Response: count = 970799
39,533,320
en
Java
logic_ops
advanced
Write logic to check if the year 2072 is a leap year in Java.
public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 2072 is a leap year in Java. ### Response: public bool IsLeap() { int y = 2072; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
790,514
ru
C++
var_decl
beginner
Как объявить переменную y со значением 972178 в C++?
int y = 972178;
### Instruction: Как объявить переменную y со значением 972178 в C++? ### Response: int y = 972178;
31,532,447
en
Unity
string_ops
advanced
Write a function that counts vowels in a text in Unity.
public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
### Instruction: Write a function that counts vowels in a text in Unity. ### Response: public int CountVowels(string s) { int c = 0; foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++; return c; }
98,632,530
kk
JavaScript
array_ops
advanced
JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
const getMax = arr => Math.max(...arr);
### Instruction: JavaScript тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. ### Response: const getMax = arr => Math.max(...arr);
4,009,784
kk
Unity
var_decl
beginner
Unity тілінде 254792 мәнімен data айнымалысын қалай жариялауға болады?
int data = 254792;
### Instruction: Unity тілінде 254792 мәнімен data айнымалысын қалай жариялауға болады? ### Response: int data = 254792;
57,973,711
en
Unity
string_ops
advanced
Write a function that checks if a string is a palindrome in Unity.
public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
### Instruction: Write a function that checks if a string is a palindrome in Unity. ### Response: public bool IsPalindrome(string s) { int min = 0, max = s.Length - 1; while (min < max) { if (s[min] != s[max]) return false; min++; max--; } return true; }
4,178,660
ru
C++
var_decl
beginner
Как объявить переменную weight со значением 956673 в C++?
int weight = 956673;
### Instruction: Как объявить переменную weight со значением 956673 в C++? ### Response: int weight = 956673;
41,075,968
ru
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);
2,032,531
en
JavaScript
var_decl
beginner
How to declare a variable health with value 743553 in JavaScript?
let health = 743553;
### Instruction: How to declare a variable health with value 743553 in JavaScript? ### Response: let health = 743553;
16,320,721
en
JavaScript
logic_ops
advanced
Write logic to check if the year 1976 is a leap year in JavaScript.
function isLeap() { let 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 JavaScript. ### Response: function isLeap() { let y = 1976; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
37,666,078
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; }
157,264
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 7953.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7953));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 7953. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(7953));
956,971
kk
C#
var_decl
beginner
C# тілінде 195004 мәнімен health айнымалысын қалай жариялауға болады?
int health = 195004;
### Instruction: C# тілінде 195004 мәнімен health айнымалысын қалай жариялауға болады? ### Response: int health = 195004;
41,950,587
ru
Unity
logic_ops
advanced
Напишите на Unity логику проверки, является ли год 1969 високосным.
public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Напишите на Unity логику проверки, является ли год 1969 високосным. ### Response: public bool IsLeap() { int y = 1969; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
4,596,358
kk
Python
var_decl
beginner
Python тілінде 970137 мәнімен size айнымалысын қалай жариялауға болады?
size = 970137
### Instruction: Python тілінде 970137 мәнімен size айнымалысын қалай жариялауға болады? ### Response: size = 970137
61,026,038
en
Python
logic_ops
intermediate
Write logic to check if the year 1928 is a leap year in Python.
def is_leap(): year = 1928 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Write logic to check if the year 1928 is a leap year in Python. ### Response: def is_leap(): year = 1928 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
33,503,043
kk
Unity
logic_ops
intermediate
Unity тилінде 331 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 331; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Unity тилінде 331 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 331; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
18,188,074
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; }
48,684,136
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; }
79,385,125
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); }
38,505,423
kk
C#
logic_ops
intermediate
C# тилінде 235 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 235; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: C# тилінде 235 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 235; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
192,714
ru
Java
sum_n
intermediate
Напиши функцию на Java, которая считает сумму чисел от 1 до 8956.
static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8956));
### Instruction: Напиши функцию на Java, которая считает сумму чисел от 1 до 8956. ### Response: static int sumToN(int n) { int s = 0; for (int i = 1; i <= n; i++) s += i; return s; } System.out.println(sumToN(8956));
3,522,271
ru
JavaScript
var_decl
beginner
Как объявить переменную offset со значением 173569 в JavaScript?
let offset = 173569;
### Instruction: Как объявить переменную offset со значением 173569 в JavaScript? ### Response: let offset = 173569;
17,925,548
ru
Python
logic_ops
intermediate
Напишите на Python функцию, определяющую, является ли число 204 простым.
def is_prime(): n = 204 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
### Instruction: Напишите на Python функцию, определяющую, является ли число 204 простым. ### Response: def is_prime(): n = 204 return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1))
99,006,430
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; }
75,868,374
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('');
60,494,987
ru
Python
string_ops
advanced
Напишите на Python функцию, которая проверяет, является ли строка палиндромом.
def is_palindrome(s): return s == s[::-1]
### Instruction: Напишите на Python функцию, которая проверяет, является ли строка палиндромом. ### Response: def is_palindrome(s): return s == s[::-1]
4,619,015
en
Java
var_decl
beginner
How to declare a variable x with value 451318 in Java?
int x = 451318;
### Instruction: How to declare a variable x with value 451318 in Java? ### Response: int x = 451318;
4,370,307
ru
Python
var_decl
beginner
Как объявить переменную amount со значением 723546 в Python?
amount = 723546
### Instruction: Как объявить переменную amount со значением 723546 в Python? ### Response: amount = 723546
1,457,865
ru
Java
var_decl
beginner
Как объявить переменную result со значением 85109 в Java?
int result = 85109;
### Instruction: Как объявить переменную result со значением 85109 в Java? ### Response: int result = 85109;
81,558,740
en
JavaScript
logic_ops
intermediate
Write logic to check if the year 1943 is a leap year in JavaScript.
function isLeap() { let y = 1943; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
### Instruction: Write logic to check if the year 1943 is a leap year in JavaScript. ### Response: function isLeap() { let y = 1943; return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0); }
58,165,579
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; }
85,302,918
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('');
1,727,137
kk
C++
var_decl
beginner
C++ тілінде 341645 мәнімен index айнымалысын қалай жариялауға болады?
int index = 341645;
### Instruction: C++ тілінде 341645 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 341645;
22,782,724
en
Java
logic_ops
advanced
Write logic to check if the year 1971 is a leap year in Java.
public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Write logic to check if the year 1971 is a leap year in Java. ### Response: public bool IsLeap() { int y = 1971; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
56,229,570
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(); }
45,354,791
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); }
4,240,183
en
C++
var_decl
beginner
How to declare a variable amount with value 912159 in C++?
int amount = 912159;
### Instruction: How to declare a variable amount with value 912159 in C++? ### Response: int amount = 912159;
710,046
ru
JavaScript
sum_n
intermediate
Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9749.
function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9749));
### Instruction: Напиши функцию на JavaScript, которая считает сумму чисел от 1 до 9749. ### Response: function sumToN(n) { let s = 0; for (let i = 1; i <= n; i++) s += i; return s; } console.log(sumToN(9749));
98,252,527
en
Python
string_ops
intermediate
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аеёиоуыэюя')
70,934,158
ru
JavaScript
logic_ops
advanced
Напишите на JavaScript функцию, определяющую, является ли число 210 простым.
function isPrime() { let n = 210; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
### Instruction: Напишите на JavaScript функцию, определяющую, является ли число 210 простым. ### Response: function isPrime() { let n = 210; if (n <= 1) return false; for (let i = 2; i * i <= n; i++) if (n % i === 0) return false; return true; }
2,468,458
kk
C++
var_decl
beginner
C++ тілінде 766692 мәнімен buffer айнымалысын қалай жариялауға болады?
int buffer = 766692;
### Instruction: C++ тілінде 766692 мәнімен buffer айнымалысын қалай жариялауға болады? ### Response: int buffer = 766692;
74,774,042
en
C#
logic_ops
advanced
Write a function that determines if the number 31 is prime in C#.
public bool IsPrime() { int n = 31; 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 31 is prime in C#. ### Response: public bool IsPrime() { int n = 31; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
79,110,637
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; }
226,333
en
Python
factorial
advanced
Write a function in Python that calculates the factorial of 5916.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5916))
### Instruction: Write a function in Python that calculates the factorial of 5916. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(5916))
94,154,511
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; }
4,543,941
ru
JavaScript
var_decl
beginner
Как объявить переменную weight со значением 821991 в JavaScript?
let weight = 821991;
### Instruction: Как объявить переменную weight со значением 821991 в JavaScript? ### Response: let weight = 821991;
44,138,921
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; }
1,124,648
kk
Unity
var_decl
beginner
Unity тілінде 107382 мәнімен x айнымалысын қалай жариялауға болады?
int x = 107382;
### Instruction: Unity тілінде 107382 мәнімен x айнымалысын қалай жариялауға болады? ### Response: int x = 107382;
98,416,008
ru
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);
2,956,767
ru
Python
var_decl
beginner
Как объявить переменную count со значением 877261 в Python?
count = 877261
### Instruction: Как объявить переменную count со значением 877261 в Python? ### Response: count = 877261
11,030,735
kk
Python
logic_ops
intermediate
Python тилінде 1950 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
### Instruction: Python тилінде 1950 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: def is_leap(): year = 1950 return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)
3,815,466
kk
Unity
var_decl
beginner
Unity тілінде 341608 мәнімен timer айнымалысын қалай жариялауға болады?
int timer = 341608;
### Instruction: Unity тілінде 341608 мәнімен timer айнымалысын қалай жариялауға болады? ### Response: int timer = 341608;
60,375,898
kk
Java
logic_ops
advanced
Java тилінде 2026 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
### Instruction: Java тилінде 2026 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. ### Response: public bool IsLeap() { int y = 2026; return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0); }
87,928,433
ru
C++
array_ops
advanced
Напишите на C++ функцию, которая фильтрует только четные числа из списка.
public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
### Instruction: Напишите на C++ функцию, которая фильтрует только четные числа из списка. ### Response: public System.Collections.Generic.List<int> Filter(int[] arr) { var res = new System.Collections.Generic.List<int>(); foreach(int x in arr) if(x % 2 == 0) res.Add(x); return res; }
2,709,851
en
Unity
var_decl
beginner
How to declare a variable total with value 92898 in Unity?
int total = 92898;
### Instruction: How to declare a variable total with value 92898 in Unity? ### Response: int total = 92898;
10,529,223
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(); }
21,279,551
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 113 простым.
public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 113 простым. ### Response: public bool IsPrime() { int n = 113; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
3,256,661
ru
Python
var_decl
beginner
Как объявить переменную total со значением 367739 в Python?
total = 367739
### Instruction: Как объявить переменную total со значением 367739 в Python? ### Response: total = 367739
65,911,633
ru
Java
array_ops
advanced
Напишите на Java функцию, которая находит максимальное число в массиве.
public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
### Instruction: Напишите на Java функцию, которая находит максимальное число в массиве. ### Response: public int GetMax(int[] arr) { int max = arr[0]; foreach(int x in arr) if(x > max) max = x; return max; }
53,494,111
kk
Python
string_ops
intermediate
Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
def to_upper(s): return s.upper()
### Instruction: Python тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. ### Response: def to_upper(s): return s.upper()
51,813,222
kk
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,916,380
ru
Java
var_decl
beginner
Как объявить переменную data со значением 865104 в Java?
int data = 865104;
### Instruction: Как объявить переменную data со значением 865104 в Java? ### Response: int data = 865104;
4,436,153
kk
JavaScript
var_decl
beginner
JavaScript тілінде 492797 мәнімен offset айнымалысын қалай жариялауға болады?
let offset = 492797;
### Instruction: JavaScript тілінде 492797 мәнімен offset айнымалысын қалай жариялауға болады? ### Response: let offset = 492797;
64,932,342
kk
Java
logic_ops
intermediate
Java тилінде 112 санының жай сан екенін анықтайтын функцияны жазыңыз.
public bool IsPrime() { int n = 112; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Java тилінде 112 санының жай сан екенін анықтайтын функцияны жазыңыз. ### Response: public bool IsPrime() { int n = 112; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
99,012,894
ru
C++
logic_ops
advanced
Напишите на C++ функцию, определяющую, является ли число 186 простым.
public bool IsPrime() { int n = 186; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
### Instruction: Напишите на C++ функцию, определяющую, является ли число 186 простым. ### Response: public bool IsPrime() { int n = 186; if (n <= 1) return false; for (int i = 2; i * i <= n; i++) if (n % i == 0) return false; return true; }
1,377,529
en
Java
var_decl
beginner
How to declare a variable level with value 530387 in Java?
int level = 530387;
### Instruction: How to declare a variable level with value 530387 in Java? ### Response: int level = 530387;
2,376,203
ru
Unity
var_decl
beginner
Как объявить переменную timer со значением 347268 в Unity?
int timer = 347268;
### Instruction: Как объявить переменную timer со значением 347268 в Unity? ### Response: int timer = 347268;
2,487,989
kk
Unity
var_decl
beginner
Unity тілінде 972755 мәнімен index айнымалысын қалай жариялауға болады?
int index = 972755;
### Instruction: Unity тілінде 972755 мәнімен index айнымалысын қалай жариялауға болады? ### Response: int index = 972755;
51,328
ru
C#
factorial
advanced
Напиши функцию на C#, которая вычисляет факториал числа 5621.
static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5621));
### Instruction: Напиши функцию на C#, которая вычисляет факториал числа 5621. ### Response: static long Factorial(int n) { return n <= 1 ? 1 : n * Factorial(n - 1); } Console.WriteLine(Factorial(5621));
16,954
ru
Python
factorial
advanced
Напиши функцию на Python, которая вычисляет факториал числа 8455.
def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8455))
### Instruction: Напиши функцию на Python, которая вычисляет факториал числа 8455. ### Response: def factorial(n): return 1 if n <= 1 else n * factorial(n - 1) print(factorial(8455))
67,753,833
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аеёиоуыэюя')