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 |
|---|---|---|---|---|---|---|---|
18,496,616 | en | C++ | logic_ops | intermediate | Write a function that determines if the number 69 is prime in C++. | public bool IsPrime() {
int n = 69;
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 69 is prime in C++.
### Response:
public bool IsPrime() {
int n = 69;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
80,780,949 | kk | JavaScript | logic_ops | advanced | JavaScript тилінде 2065 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
JavaScript тилінде 2065 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
function isLeap() {
let y = 2065;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,590,546 | kk | Java | var_decl | beginner | Java тілінде 315311 мәнімен value айнымалысын қалай жариялауға болады? | int value = 315311; | ### Instruction:
Java тілінде 315311 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 315311; |
18,256,138 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 446 простым. | def is_prime():
n = 446
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 446 простым.
### Response:
def is_prime():
n = 446
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
55,120,399 | 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] |
97,992,028 | ru | C++ | logic_ops | intermediate | Напишите на C++ логику проверки, является ли год 2063 високосным. | public bool IsLeap() {
int y = 2063;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 2063 високосным.
### Response:
public bool IsLeap() {
int y = 2063;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,744,958 | ru | Python | var_decl | beginner | Как объявить переменную result со значением 695405 в Python? | result = 695405 | ### Instruction:
Как объявить переменную result со значением 695405 в Python?
### Response:
result = 695405 |
366,134 | en | JavaScript | sum_n | intermediate | Write a function in JavaScript that sums numbers from 1 to 8801. | function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8801)); | ### Instruction:
Write a function in JavaScript that sums numbers from 1 to 8801.
### Response:
function sumToN(n) {
let s = 0;
for (let i = 1; i <= n; i++) s += i;
return s;
}
console.log(sumToN(8801)); |
86,585,176 | ru | 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;
} |
74,353,375 | 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;
} |
50,466,706 | 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);
} |
52,115,267 | en | C# | array_ops | advanced | 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);
} |
2,931,898 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 552870 в Java? | int size = 552870; | ### Instruction:
Как объявить переменную size со значением 552870 в Java?
### Response:
int size = 552870; |
4,877,392 | kk | C++ | var_decl | beginner | C++ тілінде 405182 мәнімен value айнымалысын қалай жариялауға болады? | int value = 405182; | ### Instruction:
C++ тілінде 405182 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 405182; |
69,627,486 | en | Python | logic_ops | intermediate | Write a function that determines if the number 339 is prime in Python. | def is_prime():
n = 339
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 339 is prime in Python.
### Response:
def is_prime():
n = 339
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
94,614,216 | 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() |
59,174,634 | kk | Java | logic_ops | advanced | Java тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 2048 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2048;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
58,751,749 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
381,160 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 6812. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6812)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 6812.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(6812)); |
62,993,298 | 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;
} |
448,829 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 3600. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3600)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 3600.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3600)) |
47,238,859 | en | C# | string_ops | advanced | 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;
} |
73,497,184 | ru | Python | array_ops | intermediate | Напишите на Python функцию, которая разворачивает список задом наперед. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Напишите на Python функцию, которая разворачивает список задом наперед.
### Response:
def reverse_list(arr):
return arr[::-1] |
165,429 | ru | Python | factorial | advanced | Напиши функцию на Python, которая вычисляет факториал числа 7094. | def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7094)) | ### Instruction:
Напиши функцию на Python, которая вычисляет факториал числа 7094.
### Response:
def factorial(n):
return 1 if n <= 1 else n * factorial(n - 1)
print(factorial(7094)) |
19,597,306 | 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;
} |
489,522 | ru | C++ | var_decl | beginner | Как объявить переменную size со значением 79060 в C++? | int size = 79060; | ### Instruction:
Как объявить переменную size со значением 79060 в C++?
### Response:
int size = 79060; |
99,517,245 | en | Python | logic_ops | advanced | Write a function that determines if the number 405 is prime in Python. | def is_prime():
n = 405
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 405 is prime in Python.
### Response:
def is_prime():
n = 405
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
45,843,252 | en | Unity | logic_ops | intermediate | Write logic to check if the year 2095 is a leap year in Unity. | public bool IsLeap() {
int y = 2095;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2095 is a leap year in Unity.
### Response:
public bool IsLeap() {
int y = 2095;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
40,035,956 | kk | Java | logic_ops | advanced | Java тилінде 239 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 239;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Java тилінде 239 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 239;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
59,975,622 | 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;
} |
32,123,501 | 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;
} |
484,506 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 2354. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2354)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 2354.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(2354)); |
4,174,293 | en | C# | var_decl | beginner | How to declare a variable offset with value 910043 in C#? | int offset = 910043; | ### Instruction:
How to declare a variable offset with value 910043 in C#?
### Response:
int offset = 910043; |
96,627,437 | kk | C# | logic_ops | advanced | C# тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1924;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 1924 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1924;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
90,774,003 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
1,601,034 | en | C++ | var_decl | beginner | How to declare a variable health with value 323970 in C++? | int health = 323970; | ### Instruction:
How to declare a variable health with value 323970 in C++?
### Response:
int health = 323970; |
48,656,887 | ru | 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;
} |
63,986 | kk | Java | factorial | advanced | Java тілінде 2707 санының факториалын есептейтін функция жаз. | static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2707)); | ### Instruction:
Java тілінде 2707 санының факториалын есептейтін функция жаз.
### Response:
static long factorial(int n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
System.out.println(factorial(2707)); |
3,242,641 | ru | JavaScript | var_decl | beginner | Как объявить переменную y со значением 993113 в JavaScript? | let y = 993113; | ### Instruction:
Как объявить переменную y со значением 993113 в JavaScript?
### Response:
let y = 993113; |
92,877,857 | ru | C# | logic_ops | intermediate | Напишите на C# функцию, определяющую, является ли число 29 простым. | public bool IsPrime() {
int n = 29;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C# функцию, определяющую, является ли число 29 простым.
### Response:
public bool IsPrime() {
int n = 29;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
879,628 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 208147 мәнімен total айнымалысын қалай жариялауға болады? | let total = 208147; | ### Instruction:
JavaScript тілінде 208147 мәнімен total айнымалысын қалай жариялауға болады?
### Response:
let total = 208147; |
21,221,725 | kk | JavaScript | array_ops | advanced | JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | const reverseArr = arr => arr.reverse(); | ### Instruction:
JavaScript тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
const reverseArr = arr => arr.reverse(); |
67,531,154 | en | JavaScript | array_ops | intermediate | Write a function that reverses a list in JavaScript. | const reverseArr = arr => arr.reverse(); | ### Instruction:
Write a function that reverses a list in JavaScript.
### Response:
const reverseArr = arr => arr.reverse(); |
61,490,590 | kk | Python | array_ops | intermediate | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
4,199,705 | kk | Unity | var_decl | beginner | Unity тілінде 219957 мәнімен limit айнымалысын қалай жариялауға болады? | int limit = 219957; | ### Instruction:
Unity тілінде 219957 мәнімен limit айнымалысын қалай жариялауға болады?
### Response:
int limit = 219957; |
69,127,098 | 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;
} |
22,392,766 | en | JavaScript | string_ops | intermediate | Write a function that counts vowels in a text in JavaScript. | const countVowels = s => (s.match(/[aeiou]/gi) || []).length; | ### Instruction:
Write a function that counts vowels in a text in JavaScript.
### Response:
const countVowels = s => (s.match(/[aeiou]/gi) || []).length; |
61,860,796 | 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();
} |
25,160,223 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
95,910,787 | 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(''); |
68,633,969 | kk | Python | array_ops | advanced | Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Python тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
def reverse_list(arr):
return arr[::-1] |
2,938,954 | en | Java | var_decl | beginner | How to declare a variable weight with value 493335 in Java? | int weight = 493335; | ### Instruction:
How to declare a variable weight with value 493335 in Java?
### Response:
int weight = 493335; |
4,954,383 | en | Python | var_decl | beginner | How to declare a variable health with value 75881 in Python? | health = 75881 | ### Instruction:
How to declare a variable health with value 75881 in Python?
### Response:
health = 75881 |
3,140,028 | kk | JavaScript | var_decl | beginner | JavaScript тілінде 937064 мәнімен data айнымалысын қалай жариялауға болады? | let data = 937064; | ### Instruction:
JavaScript тілінде 937064 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
let data = 937064; |
73,811,424 | kk | 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,062,649 | en | Java | var_decl | beginner | How to declare a variable timer with value 138164 in Java? | int timer = 138164; | ### Instruction:
How to declare a variable timer with value 138164 in Java?
### Response:
int timer = 138164; |
1,704,245 | ru | Java | var_decl | beginner | Как объявить переменную data со значением 523112 в Java? | int data = 523112; | ### Instruction:
Как объявить переменную data со значением 523112 в Java?
### Response:
int data = 523112; |
72,718,742 | en | Python | logic_ops | advanced | Write logic to check if the year 2031 is a leap year in Python. | def is_leap():
year = 2031
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Write logic to check if the year 2031 is a leap year in Python.
### Response:
def is_leap():
year = 2031
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
76,874,185 | 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] |
96,873,834 | en | Python | logic_ops | advanced | Write a function that determines if the number 428 is prime in Python. | def is_prime():
n = 428
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 428 is prime in Python.
### Response:
def is_prime():
n = 428
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
98,574,183 | 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;
} |
33,255,950 | ru | Java | string_ops | intermediate | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
71,030,221 | ru | JavaScript | logic_ops | advanced | Напишите на JavaScript логику проверки, является ли год 2082 високосным. | function isLeap() {
let y = 2082;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Напишите на JavaScript логику проверки, является ли год 2082 високосным.
### Response:
function isLeap() {
let y = 2082;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
4,077,334 | en | Unity | var_decl | beginner | How to declare a variable size with value 118030 in Unity? | int size = 118030; | ### Instruction:
How to declare a variable size with value 118030 in Unity?
### Response:
int size = 118030; |
52,324,892 | ru | C++ | logic_ops | advanced | Напишите на C++ логику проверки, является ли год 1997 високосным. | public bool IsLeap() {
int y = 1997;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на C++ логику проверки, является ли год 1997 високосным.
### Response:
public bool IsLeap() {
int y = 1997;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,724,124 | ru | Java | var_decl | beginner | Как объявить переменную weight со значением 144400 в Java? | int weight = 144400; | ### Instruction:
Как объявить переменную weight со значением 144400 в Java?
### Response:
int weight = 144400; |
74,968,993 | 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,925,321 | en | Python | var_decl | beginner | How to declare a variable index with value 766861 in Python? | index = 766861 | ### Instruction:
How to declare a variable index with value 766861 in Python?
### Response:
index = 766861 |
84,851,461 | ru | Java | logic_ops | intermediate | Напишите на Java логику проверки, является ли год 1912 високосным. | public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Java логику проверки, является ли год 1912 високосным.
### Response:
public bool IsLeap() {
int y = 1912;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
1,182,661 | kk | C# | var_decl | beginner | C# тілінде 905599 мәнімен x айнымалысын қалай жариялауға болады? | int x = 905599; | ### Instruction:
C# тілінде 905599 мәнімен x айнымалысын қалай жариялауға болады?
### Response:
int x = 905599; |
31,034,533 | kk | Unity | string_ops | advanced | Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Unity тилінде мәтіндегі дауысты әріптердің санын есептейтін функцияны жазыңыз.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
363,511 | en | Unity | factorial | advanced | Write a function in Unity that calculates the factorial of 6506. | long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6506));
} | ### Instruction:
Write a function in Unity that calculates the factorial of 6506.
### Response:
long Factorial(int n) {
return n <= 1 ? 1 : n * Factorial(n - 1);
}
void Start() {
Debug.Log(Factorial(6506));
} |
3,831,797 | kk | Unity | var_decl | beginner | Unity тілінде 88792 мәнімен health айнымалысын қалай жариялауға болады? | int health = 88792; | ### Instruction:
Unity тілінде 88792 мәнімен health айнымалысын қалай жариялауға болады?
### Response:
int health = 88792; |
46,201,197 | 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() |
4,954,476 | ru | JavaScript | var_decl | beginner | Как объявить переменную data со значением 817869 в JavaScript? | let data = 817869; | ### Instruction:
Как объявить переменную data со значением 817869 в JavaScript?
### Response:
let data = 817869; |
292,203 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 7928-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(7928) << std::endl; | ### Instruction:
C++ тілінде 1-ден 7928-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(7928) << std::endl; |
33,751,648 | kk | JavaScript | string_ops | advanced | JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | const toUpper = s => s.toUpperCase(); | ### Instruction:
JavaScript тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
const toUpper = s => s.toUpperCase(); |
70,718,595 | 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;
} |
97,361,495 | 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);
} |
91,409,952 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 120 простым. | public bool IsPrime() {
int n = 120;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 120 простым.
### Response:
public bool IsPrime() {
int n = 120;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
75,165 | ru | JavaScript | factorial | advanced | Напиши функцию на JavaScript, которая вычисляет факториал числа 2064. | function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2064)); | ### Instruction:
Напиши функцию на JavaScript, которая вычисляет факториал числа 2064.
### Response:
function factorial(n) {
return n <= 1 ? 1 : n * factorial(n - 1);
}
console.log(factorial(2064)); |
4,806,276 | en | Java | var_decl | beginner | How to declare a variable rate with value 244755 in Java? | int rate = 244755; | ### Instruction:
How to declare a variable rate with value 244755 in Java?
### Response:
int rate = 244755; |
4,630,090 | kk | Unity | var_decl | beginner | Unity тілінде 653009 мәнімен speed айнымалысын қалай жариялауға болады? | int speed = 653009; | ### Instruction:
Unity тілінде 653009 мәнімен speed айнымалысын қалай жариялауға болады?
### Response:
int speed = 653009; |
82,886,219 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1921 is a leap year in JavaScript. | function isLeap() {
let y = 1921;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1921 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1921;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
1,207,992 | ru | Unity | var_decl | beginner | Как объявить переменную y со значением 464971 в Unity? | int y = 464971; | ### Instruction:
Как объявить переменную y со значением 464971 в Unity?
### Response:
int y = 464971; |
52,198,136 | en | Unity | logic_ops | advanced | Write a function that determines if the number 177 is prime in Unity. | public bool IsPrime() {
int n = 177;
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 177 is prime in Unity.
### Response:
public bool IsPrime() {
int n = 177;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
75,637,756 | kk | 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,086,909 | ru | C# | var_decl | beginner | Как объявить переменную rate со значением 651787 в C#? | int rate = 651787; | ### Instruction:
Как объявить переменную rate со значением 651787 в C#?
### Response:
int rate = 651787; |
4,813,027 | en | Python | var_decl | beginner | How to declare a variable score with value 956518 in Python? | score = 956518 | ### Instruction:
How to declare a variable score with value 956518 in Python?
### Response:
score = 956518 |
378,966 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 8259. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8259)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 8259.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8259)); |
953,370 | kk | Unity | var_decl | beginner | Unity тілінде 497493 мәнімен value айнымалысын қалай жариялауға болады? | int value = 497493; | ### Instruction:
Unity тілінде 497493 мәнімен value айнымалысын қалай жариялауға болады?
### Response:
int value = 497493; |
2,423,122 | ru | C++ | var_decl | beginner | Как объявить переменную value со значением 179106 в C++? | int value = 179106; | ### Instruction:
Как объявить переменную value со значением 179106 в C++?
### Response:
int value = 179106; |
63,336,402 | kk | C++ | logic_ops | intermediate | C++ тилінде 378 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 378;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 378 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 378;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,467,350 | ru | C# | var_decl | beginner | Как объявить переменную timer со значением 103700 в C#? | int timer = 103700; | ### Instruction:
Как объявить переменную timer со значением 103700 в C#?
### Response:
int timer = 103700; |
404,415 | kk | C++ | sum_n | intermediate | C++ тілінде 1-ден 3674-ге дейінгі сандардың қосындысын есептейтін функция жаз. | 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(3674) << std::endl; | ### Instruction:
C++ тілінде 1-ден 3674-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### 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(3674) << std::endl; |
2,446,657 | ru | Java | var_decl | beginner | Как объявить переменную timer со значением 171871 в Java? | int timer = 171871; | ### Instruction:
Как объявить переменную timer со значением 171871 в Java?
### Response:
int timer = 171871; |
83,581,371 | kk | 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;
} |
93,917,070 | en | JavaScript | array_ops | intermediate | Write a function that filters only even numbers from a list in JavaScript. | const filterEven = arr => arr.filter(x => x % 2 === 0); | ### Instruction:
Write a function that filters only even numbers from a list in JavaScript.
### Response:
const filterEven = arr => arr.filter(x => x % 2 === 0); |
96,398,317 | kk | C# | logic_ops | intermediate | C# тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
C# тилінде 2093 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 2093;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
43,671,461 | kk | Java | string_ops | intermediate | Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Java тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.