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 |
|---|---|---|---|---|---|---|---|
1,405,020 | en | Python | var_decl | beginner | How to declare a variable result with value 163327 in Python? | result = 163327 | ### Instruction:
How to declare a variable result with value 163327 in Python?
### Response:
result = 163327 |
65,510,477 | kk | 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;
} |
83,704,292 | en | Python | logic_ops | advanced | Write a function that determines if the number 192 is prime in Python. | def is_prime():
n = 192
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 192 is prime in Python.
### Response:
def is_prime():
n = 192
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
2,766,084 | en | C++ | var_decl | beginner | How to declare a variable index with value 301708 in C++? | int index = 301708; | ### Instruction:
How to declare a variable index with value 301708 in C++?
### Response:
int index = 301708; |
51,030,869 | 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); |
43,848,331 | en | C++ | logic_ops | advanced | Write a function that determines if the number 40 is prime in C++. | public bool IsPrime() {
int n = 40;
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 40 is prime in C++.
### Response:
public bool IsPrime() {
int n = 40;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
746,995 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 110030 в Unity? | int health = 110030; | ### Instruction:
Как объявить переменную health со значением 110030 в Unity?
### Response:
int health = 110030; |
2,053,368 | ru | C++ | var_decl | beginner | Как объявить переменную timer со значением 570948 в C++? | int timer = 570948; | ### Instruction:
Как объявить переменную timer со значением 570948 в C++?
### Response:
int timer = 570948; |
99,279,050 | en | JavaScript | string_ops | intermediate | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
65,940,019 | en | Unity | string_ops | intermediate | Write a function that converts a string to uppercase in Unity. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Unity.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
30,727,356 | en | JavaScript | logic_ops | intermediate | Write a function that determines if the number 370 is prime in JavaScript. | function isPrime() {
let n = 370;
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 370 is prime in JavaScript.
### Response:
function isPrime() {
let n = 370;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
30,380,223 | ru | C++ | array_ops | advanced | Напишите на C++ функцию, которая разворачивает список задом наперед. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
Напишите на C++ функцию, которая разворачивает список задом наперед.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
3,894,095 | ru | Java | var_decl | beginner | Как объявить переменную size со значением 956691 в Java? | int size = 956691; | ### Instruction:
Как объявить переменную size со значением 956691 в Java?
### Response:
int size = 956691; |
219,526 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 8824. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8824)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 8824.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(8824)); |
3,350,245 | en | C# | var_decl | beginner | How to declare a variable index with value 876081 in C#? | int index = 876081; | ### Instruction:
How to declare a variable index with value 876081 in C#?
### Response:
int index = 876081; |
57,117,945 | ru | Java | string_ops | advanced | Напишите на Java функцию, которая переводит строку в верхний регистр. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Напишите на Java функцию, которая переводит строку в верхний регистр.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
45,728,603 | ru | Java | logic_ops | intermediate | Напишите на Java функцию, определяющую, является ли число 375 простым. | public bool IsPrime() {
int n = 375;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 375 простым.
### Response:
public bool IsPrime() {
int n = 375;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
119,110 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 411. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(411)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 411.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(411)) |
73,678,202 | kk | Python | array_ops | advanced | Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | def get_max(arr):
return max(arr) | ### Instruction:
Python тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
def get_max(arr):
return max(arr) |
305,218 | ru | Python | sum_n | intermediate | Напиши функцию на Python, которая считает сумму чисел от 1 до 6023. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6023)) | ### Instruction:
Напиши функцию на Python, которая считает сумму чисел от 1 до 6023.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(6023)) |
94,900,163 | en | Python | array_ops | intermediate | Write a function that reverses a list in Python. | def reverse_list(arr):
return arr[::-1] | ### Instruction:
Write a function that reverses a list in Python.
### Response:
def reverse_list(arr):
return arr[::-1] |
62,467,676 | 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;
} |
300,726 | en | Python | var_decl | beginner | How to declare a variable data with value 112182 in Python? | data = 112182 | ### Instruction:
How to declare a variable data with value 112182 in Python?
### Response:
data = 112182 |
2,342,131 | en | Unity | var_decl | beginner | How to declare a variable size with value 64626 in Unity? | int size = 64626; | ### Instruction:
How to declare a variable size with value 64626 in Unity?
### Response:
int size = 64626; |
62,638,657 | en | Java | logic_ops | advanced | Write a function that determines if the number 322 is prime in Java. | public bool IsPrime() {
int n = 322;
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 322 is prime in Java.
### Response:
public bool IsPrime() {
int n = 322;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
66,867,239 | kk | Unity | string_ops | intermediate | Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Unity тилінде жолды жоғарғы регистрге ауыстыратын функцияны жазыңыз.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
92,366,443 | kk | 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] |
50,683,952 | kk | Java | logic_ops | intermediate | Java тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз. | public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Java тилінде 1943 жылы кібісе жыл екенін тексеретін логиканы жазыңыз.
### Response:
public bool IsLeap() {
int y = 1943;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
86,298,600 | ru | C++ | logic_ops | intermediate | Напишите на C++ функцию, определяющую, является ли число 341 простым. | public bool IsPrime() {
int n = 341;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 341 простым.
### Response:
public bool IsPrime() {
int n = 341;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
81,193,826 | ru | Python | string_ops | advanced | Напишите на Python функцию, которая переводит строку в верхний регистр. | def to_upper(s):
return s.upper() | ### Instruction:
Напишите на Python функцию, которая переводит строку в верхний регистр.
### Response:
def to_upper(s):
return s.upper() |
85,669,246 | ru | Unity | logic_ops | intermediate | Напишите на Unity функцию, определяющую, является ли число 32 простым. | public bool IsPrime() {
int n = 32;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 32 простым.
### Response:
public bool IsPrime() {
int n = 32;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,140,308 | ru | Unity | var_decl | beginner | Как объявить переменную size со значением 332626 в Unity? | int size = 332626; | ### Instruction:
Как объявить переменную size со значением 332626 в Unity?
### Response:
int size = 332626; |
17,303,359 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1979 is a leap year in JavaScript. | function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1979 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1979;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
47,518,428 | kk | C# | logic_ops | advanced | C# тилінде 95 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 95;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C# тилінде 95 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 95;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
3,001,985 | ru | Unity | var_decl | beginner | Как объявить переменную count со значением 343722 в Unity? | int count = 343722; | ### Instruction:
Как объявить переменную count со значением 343722 в Unity?
### Response:
int count = 343722; |
3,571,211 | ru | JavaScript | var_decl | beginner | Как объявить переменную level со значением 576493 в JavaScript? | let level = 576493; | ### Instruction:
Как объявить переменную level со значением 576493 в JavaScript?
### Response:
let level = 576493; |
21,413,734 | 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(''); |
1,341,415 | en | Python | var_decl | beginner | How to declare a variable score with value 842206 in Python? | score = 842206 | ### Instruction:
How to declare a variable score with value 842206 in Python?
### Response:
score = 842206 |
66,028,428 | 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;
} |
92,620,357 | kk | C++ | logic_ops | intermediate | C++ тилінде 403 санының жай сан екенін анықтайтын функцияны жазыңыз. | public bool IsPrime() {
int n = 403;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
C++ тилінде 403 санының жай сан екенін анықтайтын функцияны жазыңыз.
### Response:
public bool IsPrime() {
int n = 403;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
23,382,337 | ru | JavaScript | logic_ops | intermediate | Напишите на JavaScript функцию, определяющую, является ли число 208 простым. | function isPrime() {
let n = 208;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} | ### Instruction:
Напишите на JavaScript функцию, определяющую, является ли число 208 простым.
### Response:
function isPrime() {
let n = 208;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
1,218,527 | ru | Python | var_decl | beginner | Как объявить переменную health со значением 132338 в Python? | health = 132338 | ### Instruction:
Как объявить переменную health со значением 132338 в Python?
### Response:
health = 132338 |
79,824,507 | ru | Python | logic_ops | advanced | Напишите на Python логику проверки, является ли год 1995 високосным. | def is_leap():
year = 1995
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ### Instruction:
Напишите на Python логику проверки, является ли год 1995 високосным.
### Response:
def is_leap():
year = 1995
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) |
39,680,869 | 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() |
79,508,505 | en | JavaScript | string_ops | advanced | Write a function that converts a string to uppercase in JavaScript. | const toUpper = s => s.toUpperCase(); | ### Instruction:
Write a function that converts a string to uppercase in JavaScript.
### Response:
const toUpper = s => s.toUpperCase(); |
84,488,534 | kk | C++ | array_ops | advanced | C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз. | public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} | ### Instruction:
C++ тилінде тізімді керісінше айналдыратын функцияны жазыңыз.
### Response:
public void Reverse(int[] arr) {
System.Array.Reverse(arr);
} |
359,360 | ru | C# | sum_n | intermediate | Напиши функцию на C#, которая считает сумму чисел от 1 до 3370. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3370)); | ### Instruction:
Напиши функцию на C#, которая считает сумму чисел от 1 до 3370.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(3370)); |
4,708,321 | en | Unity | var_decl | beginner | How to declare a variable total with value 496605 in Unity? | int total = 496605; | ### Instruction:
How to declare a variable total with value 496605 in Unity?
### Response:
int total = 496605; |
3,463,114 | kk | Python | var_decl | beginner | Python тілінде 983966 мәнімен timer айнымалысын қалай жариялауға болады? | timer = 983966 | ### Instruction:
Python тілінде 983966 мәнімен timer айнымалысын қалай жариялауға болады?
### Response:
timer = 983966 |
38,880,841 | en | C++ | string_ops | intermediate | Write a function that counts vowels in a text in C++. | public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} | ### Instruction:
Write a function that counts vowels in a text in C++.
### Response:
public int CountVowels(string s) {
int c = 0;
foreach(char ch in s.ToLower()) if("aeiou".Contains(ch)) c++;
return c;
} |
2,763,323 | kk | C# | var_decl | beginner | C# тілінде 210057 мәнімен y айнымалысын қалай жариялауға болады? | int y = 210057; | ### Instruction:
C# тілінде 210057 мәнімен y айнымалысын қалай жариялауға болады?
### Response:
int y = 210057; |
96,230,542 | en | Java | logic_ops | advanced | Write logic to check if the year 2068 is a leap year in Java. | public bool IsLeap() {
int y = 2068;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 2068 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 2068;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
71,544,996 | ru | C++ | logic_ops | advanced | Напишите на C++ функцию, определяющую, является ли число 232 простым. | public bool IsPrime() {
int n = 232;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на C++ функцию, определяющую, является ли число 232 простым.
### Response:
public bool IsPrime() {
int n = 232;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
42,364,443 | 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;
} |
577,849 | kk | Java | var_decl | beginner | Java тілінде 731546 мәнімен offset айнымалысын қалай жариялауға болады? | int offset = 731546; | ### Instruction:
Java тілінде 731546 мәнімен offset айнымалысын қалай жариялауға болады?
### Response:
int offset = 731546; |
3,036,696 | ru | Python | var_decl | beginner | Как объявить переменную offset со значением 450914 в Python? | offset = 450914 | ### Instruction:
Как объявить переменную offset со значением 450914 в Python?
### Response:
offset = 450914 |
714,225 | en | C++ | sum_n | intermediate | Write a function in C++ that sums numbers from 1 to 2135. | 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(2135) << std::endl; | ### Instruction:
Write a function in C++ that sums numbers from 1 to 2135.
### 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(2135) << std::endl; |
50,569,152 | en | JavaScript | logic_ops | advanced | Write logic to check if the year 1903 is a leap year in JavaScript. | function isLeap() {
let y = 1903;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} | ### Instruction:
Write logic to check if the year 1903 is a leap year in JavaScript.
### Response:
function isLeap() {
let y = 1903;
return y % 4 === 0 && (y % 100 !== 0 || y % 400 === 0);
} |
43,969,646 | ru | Unity | logic_ops | advanced | Напишите на Unity функцию, определяющую, является ли число 388 простым. | public bool IsPrime() {
int n = 388;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Unity функцию, определяющую, является ли число 388 простым.
### Response:
public bool IsPrime() {
int n = 388;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,790,125 | ru | Unity | var_decl | beginner | Как объявить переменную health со значением 63398 в Unity? | int health = 63398; | ### Instruction:
Как объявить переменную health со значением 63398 в Unity?
### Response:
int health = 63398; |
47,545,925 | en | C# | string_ops | intermediate | Write a function that checks if a string is a palindrome in C#. | public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} | ### Instruction:
Write a function that checks if a string is a palindrome in C#.
### Response:
public bool IsPalindrome(string s) {
int min = 0, max = s.Length - 1;
while (min < max) {
if (s[min] != s[max]) return false;
min++; max--;
}
return true;
} |
3,404,395 | ru | Unity | var_decl | beginner | Как объявить переменную index со значением 695980 в Unity? | int index = 695980; | ### Instruction:
Как объявить переменную index со значением 695980 в Unity?
### Response:
int index = 695980; |
4,402,235 | kk | Java | var_decl | beginner | Java тілінде 55741 мәнімен amount айнымалысын қалай жариялауға болады? | int amount = 55741; | ### Instruction:
Java тілінде 55741 мәнімен amount айнымалысын қалай жариялауға болады?
### Response:
int amount = 55741; |
2,139,425 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 308912 in JavaScript? | let y = 308912; | ### Instruction:
How to declare a variable y with value 308912 in JavaScript?
### Response:
let y = 308912; |
85,399,335 | ru | Java | logic_ops | advanced | Напишите на Java функцию, определяющую, является ли число 408 простым. | public bool IsPrime() {
int n = 408;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} | ### Instruction:
Напишите на Java функцию, определяющую, является ли число 408 простым.
### Response:
public bool IsPrime() {
int n = 408;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
1,821,498 | en | Unity | var_decl | beginner | How to declare a variable limit with value 531757 in Unity? | int limit = 531757; | ### Instruction:
How to declare a variable limit with value 531757 in Unity?
### Response:
int limit = 531757; |
1,898,833 | kk | Java | var_decl | beginner | Java тілінде 767374 мәнімен level айнымалысын қалай жариялауға болады? | int level = 767374; | ### Instruction:
Java тілінде 767374 мәнімен level айнымалысын қалай жариялауға болады?
### Response:
int level = 767374; |
2,227,013 | kk | Java | var_decl | beginner | Java тілінде 699287 мәнімен buffer айнымалысын қалай жариялауға болады? | int buffer = 699287; | ### Instruction:
Java тілінде 699287 мәнімен buffer айнымалысын қалай жариялауға болады?
### Response:
int buffer = 699287; |
92,998,190 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 2040 високосным. | public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 2040 високосным.
### Response:
public bool IsLeap() {
int y = 2040;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
881,188 | en | Java | sum_n | intermediate | Write a function in Java that sums numbers from 1 to 5657. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5657)); | ### Instruction:
Write a function in Java that sums numbers from 1 to 5657.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(5657)); |
1,226,787 | kk | C# | var_decl | beginner | C# тілінде 354994 мәнімен rate айнымалысын қалай жариялауға болады? | int rate = 354994; | ### Instruction:
C# тілінде 354994 мәнімен rate айнымалысын қалай жариялауға болады?
### Response:
int rate = 354994; |
1,997,852 | kk | C++ | var_decl | beginner | C++ тілінде 144859 мәнімен data айнымалысын қалай жариялауға болады? | int data = 144859; | ### Instruction:
C++ тілінде 144859 мәнімен data айнымалысын қалай жариялауға болады?
### Response:
int data = 144859; |
2,007,894 | kk | Python | var_decl | beginner | Python тілінде 669910 мәнімен count айнымалысын қалай жариялауға болады? | count = 669910 | ### Instruction:
Python тілінде 669910 мәнімен count айнымалысын қалай жариялауға болады?
### Response:
count = 669910 |
76,077 | ru | C++ | sum_n | intermediate | Напиши функцию на C++, которая считает сумму чисел от 1 до 6417. | 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(6417) << std::endl; | ### Instruction:
Напиши функцию на C++, которая считает сумму чисел от 1 до 6417.
### 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(6417) << std::endl; |
90,701,128 | ru | Unity | logic_ops | intermediate | Напишите на Unity логику проверки, является ли год 1985 високосным. | public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Напишите на Unity логику проверки, является ли год 1985 високосным.
### Response:
public bool IsLeap() {
int y = 1985;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
2,941,497 | en | C++ | var_decl | beginner | How to declare a variable count with value 306681 in C++? | int count = 306681; | ### Instruction:
How to declare a variable count with value 306681 in C++?
### Response:
int count = 306681; |
48,169,777 | en | C# | logic_ops | advanced | Write a function that determines if the number 90 is prime in C#. | public bool IsPrime() {
int n = 90;
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 90 is prime in C#.
### Response:
public bool IsPrime() {
int n = 90;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
4,449,232 | en | JavaScript | var_decl | beginner | How to declare a variable y with value 749591 in JavaScript? | let y = 749591; | ### Instruction:
How to declare a variable y with value 749591 in JavaScript?
### Response:
let y = 749591; |
17,307,698 | 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;
} |
721,639 | en | Python | sum_n | intermediate | Write a function in Python that sums numbers from 1 to 3449. | def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3449)) | ### Instruction:
Write a function in Python that sums numbers from 1 to 3449.
### Response:
def sum_to_n(n):
return sum(range(1, n + 1))
print(sum_to_n(3449)) |
516,448 | en | C# | sum_n | intermediate | Write a function in C# that sums numbers from 1 to 6693. | static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6693)); | ### Instruction:
Write a function in C# that sums numbers from 1 to 6693.
### Response:
static int SumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
Console.WriteLine(SumToN(6693)); |
68,998,932 | en | C# | logic_ops | advanced | Write a function that determines if the number 170 is prime in C#. | public bool IsPrime() {
int n = 170;
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 170 is prime in C#.
### Response:
public bool IsPrime() {
int n = 170;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
2,577,319 | ru | C++ | var_decl | beginner | Как объявить переменную amount со значением 699929 в C++? | int amount = 699929; | ### Instruction:
Как объявить переменную amount со значением 699929 в C++?
### Response:
int amount = 699929; |
42,035,404 | en | Java | string_ops | advanced | Write a function that converts a string to uppercase in Java. | public string ToUpper(string s) {
return s.ToUpper();
} | ### Instruction:
Write a function that converts a string to uppercase in Java.
### Response:
public string ToUpper(string s) {
return s.ToUpper();
} |
109,718 | kk | Java | sum_n | intermediate | Java тілінде 1-ден 9394-ге дейінгі сандардың қосындысын есептейтін функция жаз. | static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9394)); | ### Instruction:
Java тілінде 1-ден 9394-ге дейінгі сандардың қосындысын есептейтін функция жаз.
### Response:
static int sumToN(int n) {
int s = 0;
for (int i = 1; i <= n; i++) s += i;
return s;
}
System.out.println(sumToN(9394)); |
62,374,073 | en | Unity | array_ops | intermediate | 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;
} |
90,873,881 | kk | Java | string_ops | intermediate | 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;
} |
94,055,657 | en | Python | array_ops | intermediate | 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] |
84,416,714 | kk | C# | array_ops | advanced | C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз. | public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} | ### Instruction:
C# тилінде жиымдағы ең үлкен санды табатын функцияны жазыңыз.
### Response:
public int GetMax(int[] arr) {
int max = arr[0];
foreach(int x in arr) if(x > max) max = x;
return max;
} |
4,223,700 | ru | Unity | var_decl | beginner | Как объявить переменную data со значением 172351 в Unity? | int data = 172351; | ### Instruction:
Как объявить переменную data со значением 172351 в Unity?
### Response:
int data = 172351; |
15,305,054 | ru | Python | logic_ops | intermediate | Напишите на Python функцию, определяющую, является ли число 452 простым. | def is_prime():
n = 452
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) | ### Instruction:
Напишите на Python функцию, определяющую, является ли число 452 простым.
### Response:
def is_prime():
n = 452
return n > 1 and all(n % i != 0 for i in range(2, int(n**0.5) + 1)) |
2,313,039 | ru | JavaScript | var_decl | beginner | Как объявить переменную level со значением 757403 в JavaScript? | let level = 757403; | ### Instruction:
Как объявить переменную level со значением 757403 в JavaScript?
### Response:
let level = 757403; |
4,079,436 | ru | C++ | var_decl | beginner | Как объявить переменную y со значением 584086 в C++? | int y = 584086; | ### Instruction:
Как объявить переменную y со значением 584086 в C++?
### Response:
int y = 584086; |
66,051,638 | 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); |
59,259,299 | 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;
} |
93,417,060 | en | JavaScript | logic_ops | advanced | Write a function that determines if the number 270 is prime in JavaScript. | function isPrime() {
let n = 270;
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 270 is prime in JavaScript.
### Response:
function isPrime() {
let n = 270;
if (n <= 1) return false;
for (let i = 2; i * i <= n; i++) if (n % i === 0) return false;
return true;
} |
926,172 | ru | Unity | var_decl | beginner | Как объявить переменную value со значением 981913 в Unity? | int value = 981913; | ### Instruction:
Как объявить переменную value со значением 981913 в Unity?
### Response:
int value = 981913; |
36,698,556 | 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);
} |
94,664,499 | en | Java | logic_ops | advanced | Write logic to check if the year 1939 is a leap year in Java. | public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} | ### Instruction:
Write logic to check if the year 1939 is a leap year in Java.
### Response:
public bool IsLeap() {
int y = 1939;
return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
} |
82,998,247 | en | C# | logic_ops | advanced | Write a function that determines if the number 467 is prime in C#. | public bool IsPrime() {
int n = 467;
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 467 is prime in C#.
### Response:
public bool IsPrime() {
int n = 467;
if (n <= 1) return false;
for (int i = 2; i * i <= n; i++) if (n % i == 0) return false;
return true;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.